[2025-03-03 00:00:05] Production.INFO: next invoice date [2025-03-03 00:00:05] Production.INFO: 2025-03-31 [2025-03-03 00:00:05] Production.INFO: getdaysdiff [2025-03-03 00:00:05] Production.INFO: +28 [2025-03-03 00:00:05] Production.INFO: call prc_setAccountDiscountPlan (208,11,1,28,28,'RMScheduler',2025-03-03 00:00:05,0,0,,,0) [2025-03-03 00:00:05] Production.INFO: next invoice date [2025-03-03 00:00:05] Production.INFO: 2025-03-31 [2025-03-03 00:00:05] Production.INFO: getdaysdiff [2025-03-03 00:00:05] Production.INFO: +28 [2025-03-03 00:00:05] Production.INFO: call prc_setAccountDiscountPlan (208,13,2,28,28,'RMScheduler',2025-03-03 00:00:05,0,0,,,0) [2025-03-03 00:00:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:00:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:00:18] Production.INFO: count ==1335 [2025-03-03 00:00:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:00:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594649', 'tblTempUsageDetail_20' ) start [2025-03-03 00:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594649', 'tblTempUsageDetail_20' ) end [2025-03-03 00:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594649', 'tblTempVendorCDR_20' ) start [2025-03-03 00:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594649', 'tblTempVendorCDR_20' ) end [2025-03-03 00:00:18] Production.INFO: ProcessCDR(1,14594649,1,1,2) [2025-03-03 00:00:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594649,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:00:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594649,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:00:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594649,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:00:29] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594649,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:00:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594649', 'tblTempUsageDetail_20' ) start [2025-03-03 00:00:32] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594649', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:00:33] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:00:33] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:00:33] Production.INFO: ==18720== Releasing lock... [2025-03-03 00:00:33] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:00:33] Production.INFO: 39 MB #Memory Used# [2025-03-03 00:01:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:01:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:01:16] Production.INFO: count ==1335 [2025-03-03 00:01:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:01:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594654', 'tblTempUsageDetail_20' ) start [2025-03-03 00:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594654', 'tblTempUsageDetail_20' ) end [2025-03-03 00:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594654', 'tblTempVendorCDR_20' ) start [2025-03-03 00:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594654', 'tblTempVendorCDR_20' ) end [2025-03-03 00:01:17] Production.INFO: ProcessCDR(1,14594654,1,1,2) [2025-03-03 00:01:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594654,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:01:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594654,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:01:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594654,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:01:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594654,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:01:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594654', 'tblTempUsageDetail_20' ) start [2025-03-03 00:01:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594654', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:01:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:01:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:01:24] Production.INFO: ==18828== Releasing lock... [2025-03-03 00:01:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:01:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-03 00:02:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:02:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:02:16] Production.INFO: count ==409 [2025-03-03 00:02:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:02:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594659', 'tblTempUsageDetail_20' ) start [2025-03-03 00:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594659', 'tblTempUsageDetail_20' ) end [2025-03-03 00:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594659', 'tblTempVendorCDR_20' ) start [2025-03-03 00:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594659', 'tblTempVendorCDR_20' ) end [2025-03-03 00:02:17] Production.INFO: ProcessCDR(1,14594659,1,1,2) [2025-03-03 00:02:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594659,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:02:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594659,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:02:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594659,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:02:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594659,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:02:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594659', 'tblTempUsageDetail_20' ) start [2025-03-03 00:02:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594659', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:02:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:02:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:02:25] Production.INFO: ==18923== Releasing lock... [2025-03-03 00:02:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:02:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:03:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:03:17] Production.INFO: count ==409 [2025-03-03 00:03:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:03:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594664', 'tblTempUsageDetail_20' ) start [2025-03-03 00:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594664', 'tblTempUsageDetail_20' ) end [2025-03-03 00:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594664', 'tblTempVendorCDR_20' ) start [2025-03-03 00:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594664', 'tblTempVendorCDR_20' ) end [2025-03-03 00:03:17] Production.INFO: ProcessCDR(1,14594664,1,1,2) [2025-03-03 00:03:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594664,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:03:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594664,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:03:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594664,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:03:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594664,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:03:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594664', 'tblTempUsageDetail_20' ) start [2025-03-03 00:03:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594664', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:03:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:03:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:03:24] Production.INFO: ==19010== Releasing lock... [2025-03-03 00:03:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:03:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:04:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:04:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:04:16] Production.INFO: count ==409 [2025-03-03 00:04:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:04:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:04:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594669', 'tblTempUsageDetail_20' ) start [2025-03-03 00:04:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594669', 'tblTempUsageDetail_20' ) end [2025-03-03 00:04:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594669', 'tblTempVendorCDR_20' ) start [2025-03-03 00:04:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594669', 'tblTempVendorCDR_20' ) end [2025-03-03 00:04:16] Production.INFO: ProcessCDR(1,14594669,1,1,2) [2025-03-03 00:04:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594669,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:04:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594669,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:04:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594669,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:04:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594669,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:04:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594669', 'tblTempUsageDetail_20' ) start [2025-03-03 00:04:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594669', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:04:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:04:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:04:24] Production.INFO: ==19095== Releasing lock... [2025-03-03 00:04:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:04:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:05:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:05:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:05:16] Production.INFO: count ==409 [2025-03-03 00:05:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:05:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594674', 'tblTempUsageDetail_20' ) start [2025-03-03 00:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594674', 'tblTempUsageDetail_20' ) end [2025-03-03 00:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594674', 'tblTempVendorCDR_20' ) start [2025-03-03 00:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594674', 'tblTempVendorCDR_20' ) end [2025-03-03 00:05:17] Production.INFO: ProcessCDR(1,14594674,1,1,2) [2025-03-03 00:05:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594674,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:05:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594674,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:05:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594674,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:05:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594674,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:05:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594674', 'tblTempUsageDetail_20' ) start [2025-03-03 00:05:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594674', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:05:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:05:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:05:24] Production.INFO: ==19222== Releasing lock... [2025-03-03 00:05:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:05:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:06:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:06:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:06:16] Production.INFO: count ==409 [2025-03-03 00:06:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:06:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594679', 'tblTempUsageDetail_20' ) start [2025-03-03 00:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594679', 'tblTempUsageDetail_20' ) end [2025-03-03 00:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594679', 'tblTempVendorCDR_20' ) start [2025-03-03 00:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594679', 'tblTempVendorCDR_20' ) end [2025-03-03 00:06:16] Production.INFO: ProcessCDR(1,14594679,1,1,2) [2025-03-03 00:06:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594679,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:06:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594679,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:06:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594679,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:06:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594679,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:06:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594679', 'tblTempUsageDetail_20' ) start [2025-03-03 00:06:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594679', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:06:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:06:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:06:23] Production.INFO: ==19302== Releasing lock... [2025-03-03 00:06:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:06:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:07:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:07:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:07:16] Production.INFO: count ==409 [2025-03-03 00:07:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:07:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594684', 'tblTempUsageDetail_20' ) start [2025-03-03 00:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594684', 'tblTempUsageDetail_20' ) end [2025-03-03 00:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594684', 'tblTempVendorCDR_20' ) start [2025-03-03 00:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594684', 'tblTempVendorCDR_20' ) end [2025-03-03 00:07:17] Production.INFO: ProcessCDR(1,14594684,1,1,2) [2025-03-03 00:07:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594684,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:07:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594684,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:07:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594684,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:07:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594684,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:07:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594684', 'tblTempUsageDetail_20' ) start [2025-03-03 00:07:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594684', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:07:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:07:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:07:25] Production.INFO: ==19392== Releasing lock... [2025-03-03 00:07:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:07:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:08:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:08:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:08:16] Production.INFO: count ==409 [2025-03-03 00:08:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:08:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594689', 'tblTempUsageDetail_20' ) start [2025-03-03 00:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594689', 'tblTempUsageDetail_20' ) end [2025-03-03 00:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594689', 'tblTempVendorCDR_20' ) start [2025-03-03 00:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594689', 'tblTempVendorCDR_20' ) end [2025-03-03 00:08:16] Production.INFO: ProcessCDR(1,14594689,1,1,2) [2025-03-03 00:08:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594689,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:08:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594689,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:08:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594689,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:08:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594689,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:08:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594689', 'tblTempUsageDetail_20' ) start [2025-03-03 00:08:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594689', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:08:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:08:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:08:25] Production.INFO: ==19486== Releasing lock... [2025-03-03 00:08:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:08:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:09:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:09:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:09:16] Production.INFO: count ==409 [2025-03-03 00:09:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:09:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594694', 'tblTempUsageDetail_20' ) start [2025-03-03 00:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594694', 'tblTempUsageDetail_20' ) end [2025-03-03 00:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594694', 'tblTempVendorCDR_20' ) start [2025-03-03 00:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594694', 'tblTempVendorCDR_20' ) end [2025-03-03 00:09:16] Production.INFO: ProcessCDR(1,14594694,1,1,2) [2025-03-03 00:09:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594694,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:09:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594694,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:09:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594694,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:09:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594694,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:09:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594694', 'tblTempUsageDetail_20' ) start [2025-03-03 00:09:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594694', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:09:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:09:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:09:24] Production.INFO: ==19560== Releasing lock... [2025-03-03 00:09:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:09:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:10:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:10:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:10:16] Production.INFO: count ==409 [2025-03-03 00:10:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:10:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:10:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594699', 'tblTempUsageDetail_20' ) start [2025-03-03 00:10:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594699', 'tblTempUsageDetail_20' ) end [2025-03-03 00:10:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594699', 'tblTempVendorCDR_20' ) start [2025-03-03 00:10:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594699', 'tblTempVendorCDR_20' ) end [2025-03-03 00:10:16] Production.INFO: ProcessCDR(1,14594699,1,1,2) [2025-03-03 00:10:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594699,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:10:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594699,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:10:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594699,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:10:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594699,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:10:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594699', 'tblTempUsageDetail_20' ) start [2025-03-03 00:10:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594699', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:10:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:10:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:10:24] Production.INFO: ==19642== Releasing lock... [2025-03-03 00:10:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:10:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:11:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:11:16] Production.INFO: count ==409 [2025-03-03 00:11:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:11:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594705', 'tblTempUsageDetail_20' ) start [2025-03-03 00:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594705', 'tblTempUsageDetail_20' ) end [2025-03-03 00:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594705', 'tblTempVendorCDR_20' ) start [2025-03-03 00:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594705', 'tblTempVendorCDR_20' ) end [2025-03-03 00:11:17] Production.INFO: ProcessCDR(1,14594705,1,1,2) [2025-03-03 00:11:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594705,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:11:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594705,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:11:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594705,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:11:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594705,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:11:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594705', 'tblTempUsageDetail_20' ) start [2025-03-03 00:11:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594705', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:11:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:11:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:11:24] Production.INFO: ==19735== Releasing lock... [2025-03-03 00:11:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:11:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:12:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:12:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:12:17] Production.INFO: count ==409 [2025-03-03 00:12:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:12:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594710', 'tblTempUsageDetail_20' ) start [2025-03-03 00:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594710', 'tblTempUsageDetail_20' ) end [2025-03-03 00:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594710', 'tblTempVendorCDR_20' ) start [2025-03-03 00:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594710', 'tblTempVendorCDR_20' ) end [2025-03-03 00:12:17] Production.INFO: ProcessCDR(1,14594710,1,1,2) [2025-03-03 00:12:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594710,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:12:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594710,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:12:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594710,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:12:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594710,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:12:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594710', 'tblTempUsageDetail_20' ) start [2025-03-03 00:12:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594710', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:12:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:12:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:12:25] Production.INFO: ==19829== Releasing lock... [2025-03-03 00:12:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:12:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:13:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:13:16] Production.INFO: count ==409 [2025-03-03 00:13:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:13:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:13:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594715', 'tblTempUsageDetail_20' ) start [2025-03-03 00:13:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594715', 'tblTempUsageDetail_20' ) end [2025-03-03 00:13:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594715', 'tblTempVendorCDR_20' ) start [2025-03-03 00:13:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594715', 'tblTempVendorCDR_20' ) end [2025-03-03 00:13:16] Production.INFO: ProcessCDR(1,14594715,1,1,2) [2025-03-03 00:13:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594715,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:13:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594715,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:13:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594715,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:13:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594715,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:13:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594715', 'tblTempUsageDetail_20' ) start [2025-03-03 00:13:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594715', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:13:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:13:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:13:24] Production.INFO: ==19918== Releasing lock... [2025-03-03 00:13:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:13:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:14:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:14:17] Production.INFO: count ==409 [2025-03-03 00:14:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:14:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594720', 'tblTempUsageDetail_20' ) start [2025-03-03 00:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594720', 'tblTempUsageDetail_20' ) end [2025-03-03 00:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594720', 'tblTempVendorCDR_20' ) start [2025-03-03 00:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594720', 'tblTempVendorCDR_20' ) end [2025-03-03 00:14:17] Production.INFO: ProcessCDR(1,14594720,1,1,2) [2025-03-03 00:14:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594720,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:14:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594720,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:14:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594720,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:14:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594720,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:14:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594720', 'tblTempUsageDetail_20' ) start [2025-03-03 00:14:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594720', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:14:32] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:14:32] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:14:33] Production.INFO: ==20021== Releasing lock... [2025-03-03 00:14:33] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:14:33] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:15:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:15:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:15:16] Production.INFO: count ==409 [2025-03-03 00:15:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:15:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594725', 'tblTempUsageDetail_20' ) start [2025-03-03 00:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594725', 'tblTempUsageDetail_20' ) end [2025-03-03 00:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594725', 'tblTempVendorCDR_20' ) start [2025-03-03 00:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594725', 'tblTempVendorCDR_20' ) end [2025-03-03 00:15:16] Production.INFO: ProcessCDR(1,14594725,1,1,2) [2025-03-03 00:15:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594725,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:15:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594725,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:15:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594725,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:15:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594725,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:15:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594725', 'tblTempUsageDetail_20' ) start [2025-03-03 00:15:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594725', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:15:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:15:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:15:24] Production.INFO: ==20113== Releasing lock... [2025-03-03 00:15:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:15:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:16:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:16:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:16:16] Production.INFO: count ==409 [2025-03-03 00:16:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:16:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594730', 'tblTempUsageDetail_20' ) start [2025-03-03 00:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594730', 'tblTempUsageDetail_20' ) end [2025-03-03 00:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594730', 'tblTempVendorCDR_20' ) start [2025-03-03 00:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594730', 'tblTempVendorCDR_20' ) end [2025-03-03 00:16:17] Production.INFO: ProcessCDR(1,14594730,1,1,2) [2025-03-03 00:16:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594730,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:16:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594730,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:16:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594730,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:16:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594730,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:16:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594730', 'tblTempUsageDetail_20' ) start [2025-03-03 00:16:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594730', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:16:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:16:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:16:24] Production.INFO: ==20196== Releasing lock... [2025-03-03 00:16:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:16:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:17:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:17:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:17:16] Production.INFO: count ==409 [2025-03-03 00:17:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:17:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594735', 'tblTempUsageDetail_20' ) start [2025-03-03 00:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594735', 'tblTempUsageDetail_20' ) end [2025-03-03 00:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594735', 'tblTempVendorCDR_20' ) start [2025-03-03 00:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594735', 'tblTempVendorCDR_20' ) end [2025-03-03 00:17:17] Production.INFO: ProcessCDR(1,14594735,1,1,2) [2025-03-03 00:17:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594735,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:17:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594735,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:17:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594735,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:17:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594735,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594735', 'tblTempUsageDetail_20' ) start [2025-03-03 00:17:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594735', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:17:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:17:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:17:24] Production.INFO: ==20278== Releasing lock... [2025-03-03 00:17:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:17:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:18:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:18:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:18:16] Production.INFO: count ==409 [2025-03-03 00:18:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:18:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594740', 'tblTempUsageDetail_20' ) start [2025-03-03 00:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594740', 'tblTempUsageDetail_20' ) end [2025-03-03 00:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594740', 'tblTempVendorCDR_20' ) start [2025-03-03 00:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594740', 'tblTempVendorCDR_20' ) end [2025-03-03 00:18:16] Production.INFO: ProcessCDR(1,14594740,1,1,2) [2025-03-03 00:18:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594740,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:18:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594740,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:18:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594740,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:18:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594740,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594740', 'tblTempUsageDetail_20' ) start [2025-03-03 00:18:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594740', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:18:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:18:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:18:24] Production.INFO: ==20392== Releasing lock... [2025-03-03 00:18:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:18:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:19:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:19:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:19:16] Production.INFO: count ==409 [2025-03-03 00:19:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:19:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594745', 'tblTempUsageDetail_20' ) start [2025-03-03 00:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594745', 'tblTempUsageDetail_20' ) end [2025-03-03 00:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594745', 'tblTempVendorCDR_20' ) start [2025-03-03 00:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594745', 'tblTempVendorCDR_20' ) end [2025-03-03 00:19:16] Production.INFO: ProcessCDR(1,14594745,1,1,2) [2025-03-03 00:19:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594745,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:19:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594745,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:19:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594745,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:19:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594745,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:19:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594745', 'tblTempUsageDetail_20' ) start [2025-03-03 00:19:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594745', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:19:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:19:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:19:24] Production.INFO: ==20484== Releasing lock... [2025-03-03 00:19:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:19:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:20:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:20:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:20:16] Production.INFO: count ==409 [2025-03-03 00:20:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:20:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:20:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594750', 'tblTempUsageDetail_20' ) start [2025-03-03 00:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594750', 'tblTempUsageDetail_20' ) end [2025-03-03 00:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594750', 'tblTempVendorCDR_20' ) start [2025-03-03 00:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594750', 'tblTempVendorCDR_20' ) end [2025-03-03 00:20:17] Production.INFO: ProcessCDR(1,14594750,1,1,2) [2025-03-03 00:20:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594750,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:20:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594750,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:20:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594750,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:20:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594750,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594750', 'tblTempUsageDetail_20' ) start [2025-03-03 00:20:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594750', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:20:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:20:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:20:25] Production.INFO: ==20595== Releasing lock... [2025-03-03 00:20:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:20:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:21:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:21:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:21:16] Production.INFO: count ==409 [2025-03-03 00:21:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:21:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594756', 'tblTempUsageDetail_20' ) start [2025-03-03 00:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594756', 'tblTempUsageDetail_20' ) end [2025-03-03 00:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594756', 'tblTempVendorCDR_20' ) start [2025-03-03 00:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594756', 'tblTempVendorCDR_20' ) end [2025-03-03 00:21:16] Production.INFO: ProcessCDR(1,14594756,1,1,2) [2025-03-03 00:21:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594756,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:21:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594756,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:21:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594756,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:21:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594756,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:21:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594756', 'tblTempUsageDetail_20' ) start [2025-03-03 00:21:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594756', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:21:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:21:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:21:24] Production.INFO: ==20711== Releasing lock... [2025-03-03 00:21:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:21:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:22:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:22:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:22:16] Production.INFO: count ==409 [2025-03-03 00:22:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:22:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594761', 'tblTempUsageDetail_20' ) start [2025-03-03 00:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594761', 'tblTempUsageDetail_20' ) end [2025-03-03 00:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594761', 'tblTempVendorCDR_20' ) start [2025-03-03 00:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594761', 'tblTempVendorCDR_20' ) end [2025-03-03 00:22:17] Production.INFO: ProcessCDR(1,14594761,1,1,2) [2025-03-03 00:22:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594761,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:22:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594761,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:22:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594761,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:22:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594761,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594761', 'tblTempUsageDetail_20' ) start [2025-03-03 00:22:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594761', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:22:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:22:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:22:24] Production.INFO: ==20803== Releasing lock... [2025-03-03 00:22:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:22:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:23:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:23:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:23:16] Production.INFO: count ==409 [2025-03-03 00:23:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:23:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594766', 'tblTempUsageDetail_20' ) start [2025-03-03 00:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594766', 'tblTempUsageDetail_20' ) end [2025-03-03 00:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594766', 'tblTempVendorCDR_20' ) start [2025-03-03 00:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594766', 'tblTempVendorCDR_20' ) end [2025-03-03 00:23:16] Production.INFO: ProcessCDR(1,14594766,1,1,2) [2025-03-03 00:23:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594766,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:23:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594766,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:23:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594766,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:23:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594766,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:23:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594766', 'tblTempUsageDetail_20' ) start [2025-03-03 00:23:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594766', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:23:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:23:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:23:24] Production.INFO: ==20886== Releasing lock... [2025-03-03 00:23:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:23:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:24:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:24:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:24:17] Production.INFO: count ==409 [2025-03-03 00:24:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:24:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594771', 'tblTempUsageDetail_20' ) start [2025-03-03 00:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594771', 'tblTempUsageDetail_20' ) end [2025-03-03 00:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594771', 'tblTempVendorCDR_20' ) start [2025-03-03 00:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594771', 'tblTempVendorCDR_20' ) end [2025-03-03 00:24:17] Production.INFO: ProcessCDR(1,14594771,1,1,2) [2025-03-03 00:24:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594771,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:24:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594771,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:24:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594771,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:24:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594771,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:24:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594771', 'tblTempUsageDetail_20' ) start [2025-03-03 00:24:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594771', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:24:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:24:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:24:24] Production.INFO: ==20984== Releasing lock... [2025-03-03 00:24:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:24:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:25:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:25:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:25:16] Production.INFO: count ==409 [2025-03-03 00:25:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:25:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594776', 'tblTempUsageDetail_20' ) start [2025-03-03 00:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594776', 'tblTempUsageDetail_20' ) end [2025-03-03 00:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594776', 'tblTempVendorCDR_20' ) start [2025-03-03 00:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594776', 'tblTempVendorCDR_20' ) end [2025-03-03 00:25:16] Production.INFO: ProcessCDR(1,14594776,1,1,2) [2025-03-03 00:25:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594776,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:25:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594776,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:25:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594776,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:25:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594776,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594776', 'tblTempUsageDetail_20' ) start [2025-03-03 00:25:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594776', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:25:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:25:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:25:23] Production.INFO: ==21068== Releasing lock... [2025-03-03 00:25:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:25:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:26:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:26:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:26:16] Production.INFO: count ==409 [2025-03-03 00:26:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:26:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594781', 'tblTempUsageDetail_20' ) start [2025-03-03 00:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594781', 'tblTempUsageDetail_20' ) end [2025-03-03 00:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594781', 'tblTempVendorCDR_20' ) start [2025-03-03 00:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594781', 'tblTempVendorCDR_20' ) end [2025-03-03 00:26:17] Production.INFO: ProcessCDR(1,14594781,1,1,2) [2025-03-03 00:26:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594781,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:26:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594781,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:26:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594781,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:26:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594781,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:26:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594781', 'tblTempUsageDetail_20' ) start [2025-03-03 00:26:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594781', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:26:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:26:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:26:24] Production.INFO: ==21153== Releasing lock... [2025-03-03 00:26:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:26:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:27:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:27:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:27:16] Production.INFO: count ==409 [2025-03-03 00:27:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:27:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594786', 'tblTempUsageDetail_20' ) start [2025-03-03 00:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594786', 'tblTempUsageDetail_20' ) end [2025-03-03 00:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594786', 'tblTempVendorCDR_20' ) start [2025-03-03 00:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594786', 'tblTempVendorCDR_20' ) end [2025-03-03 00:27:16] Production.INFO: ProcessCDR(1,14594786,1,1,2) [2025-03-03 00:27:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594786,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:27:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594786,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:27:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594786,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:27:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594786,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:27:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594786', 'tblTempUsageDetail_20' ) start [2025-03-03 00:27:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594786', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:27:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:27:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:27:24] Production.INFO: ==21237== Releasing lock... [2025-03-03 00:27:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:27:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:28:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:28:17] Production.INFO: count ==409 [2025-03-03 00:28:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:28:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594791', 'tblTempUsageDetail_20' ) start [2025-03-03 00:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594791', 'tblTempUsageDetail_20' ) end [2025-03-03 00:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594791', 'tblTempVendorCDR_20' ) start [2025-03-03 00:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594791', 'tblTempVendorCDR_20' ) end [2025-03-03 00:28:17] Production.INFO: ProcessCDR(1,14594791,1,1,2) [2025-03-03 00:28:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594791,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:28:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594791,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:28:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594791,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:28:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594791,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:28:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594791', 'tblTempUsageDetail_20' ) start [2025-03-03 00:28:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594791', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:28:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:28:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:28:24] Production.INFO: ==21321== Releasing lock... [2025-03-03 00:28:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:28:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:29:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:29:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:29:16] Production.INFO: count ==409 [2025-03-03 00:29:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:29:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594796', 'tblTempUsageDetail_20' ) start [2025-03-03 00:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594796', 'tblTempUsageDetail_20' ) end [2025-03-03 00:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594796', 'tblTempVendorCDR_20' ) start [2025-03-03 00:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594796', 'tblTempVendorCDR_20' ) end [2025-03-03 00:29:16] Production.INFO: ProcessCDR(1,14594796,1,1,2) [2025-03-03 00:29:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594796,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:29:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594796,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:29:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594796,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:29:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594796,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:29:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594796', 'tblTempUsageDetail_20' ) start [2025-03-03 00:29:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594796', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:29:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:29:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:29:24] Production.INFO: ==21409== Releasing lock... [2025-03-03 00:29:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:29:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:30:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:30:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:30:17] Production.INFO: count ==409 [2025-03-03 00:30:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:30:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594802', 'tblTempUsageDetail_20' ) start [2025-03-03 00:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594802', 'tblTempUsageDetail_20' ) end [2025-03-03 00:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594802', 'tblTempVendorCDR_20' ) start [2025-03-03 00:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594802', 'tblTempVendorCDR_20' ) end [2025-03-03 00:30:17] Production.INFO: ProcessCDR(1,14594802,1,1,2) [2025-03-03 00:30:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594802,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:30:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594802,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:30:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594802,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:30:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594802,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:30:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594802', 'tblTempUsageDetail_20' ) start [2025-03-03 00:30:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594802', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:30:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:30:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:30:24] Production.INFO: ==21493== Releasing lock... [2025-03-03 00:30:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:30:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:31:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:31:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:31:16] Production.INFO: count ==409 [2025-03-03 00:31:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:31:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594807', 'tblTempUsageDetail_20' ) start [2025-03-03 00:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594807', 'tblTempUsageDetail_20' ) end [2025-03-03 00:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594807', 'tblTempVendorCDR_20' ) start [2025-03-03 00:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594807', 'tblTempVendorCDR_20' ) end [2025-03-03 00:31:16] Production.INFO: ProcessCDR(1,14594807,1,1,2) [2025-03-03 00:31:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594807,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:31:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594807,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:31:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594807,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:31:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594807,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:31:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594807', 'tblTempUsageDetail_20' ) start [2025-03-03 00:31:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594807', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:31:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:31:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:31:24] Production.INFO: ==21589== Releasing lock... [2025-03-03 00:31:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:31:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:32:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:32:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:32:16] Production.INFO: count ==409 [2025-03-03 00:32:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:32:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594812', 'tblTempUsageDetail_20' ) start [2025-03-03 00:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594812', 'tblTempUsageDetail_20' ) end [2025-03-03 00:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594812', 'tblTempVendorCDR_20' ) start [2025-03-03 00:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594812', 'tblTempVendorCDR_20' ) end [2025-03-03 00:32:17] Production.INFO: ProcessCDR(1,14594812,1,1,2) [2025-03-03 00:32:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594812,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:32:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594812,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:32:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594812,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:32:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594812,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:32:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594812', 'tblTempUsageDetail_20' ) start [2025-03-03 00:32:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594812', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:32:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:32:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:32:24] Production.INFO: ==21678== Releasing lock... [2025-03-03 00:32:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:32:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:33:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:33:16] Production.INFO: count ==409 [2025-03-03 00:33:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:33:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594817', 'tblTempUsageDetail_20' ) start [2025-03-03 00:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594817', 'tblTempUsageDetail_20' ) end [2025-03-03 00:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594817', 'tblTempVendorCDR_20' ) start [2025-03-03 00:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594817', 'tblTempVendorCDR_20' ) end [2025-03-03 00:33:17] Production.INFO: ProcessCDR(1,14594817,1,1,2) [2025-03-03 00:33:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594817,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:33:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594817,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:33:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594817,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:33:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594817,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:33:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594817', 'tblTempUsageDetail_20' ) start [2025-03-03 00:33:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594817', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:33:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:33:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:33:24] Production.INFO: ==21759== Releasing lock... [2025-03-03 00:33:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:33:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:34:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:34:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:34:16] Production.INFO: count ==409 [2025-03-03 00:34:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:34:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594822', 'tblTempUsageDetail_20' ) start [2025-03-03 00:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594822', 'tblTempUsageDetail_20' ) end [2025-03-03 00:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594822', 'tblTempVendorCDR_20' ) start [2025-03-03 00:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594822', 'tblTempVendorCDR_20' ) end [2025-03-03 00:34:16] Production.INFO: ProcessCDR(1,14594822,1,1,2) [2025-03-03 00:34:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594822,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:34:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594822,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:34:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594822,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:34:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594822,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:34:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594822', 'tblTempUsageDetail_20' ) start [2025-03-03 00:34:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594822', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:34:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:34:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:34:23] Production.INFO: ==21849== Releasing lock... [2025-03-03 00:34:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:34:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:35:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:35:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:35:16] Production.INFO: count ==409 [2025-03-03 00:35:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:35:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:35:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594827', 'tblTempUsageDetail_20' ) start [2025-03-03 00:35:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594827', 'tblTempUsageDetail_20' ) end [2025-03-03 00:35:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594827', 'tblTempVendorCDR_20' ) start [2025-03-03 00:35:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594827', 'tblTempVendorCDR_20' ) end [2025-03-03 00:35:16] Production.INFO: ProcessCDR(1,14594827,1,1,2) [2025-03-03 00:35:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594827,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:35:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594827,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:35:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594827,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:35:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594827,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:35:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594827', 'tblTempUsageDetail_20' ) start [2025-03-03 00:35:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594827', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:35:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:35:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:35:24] Production.INFO: ==21940== Releasing lock... [2025-03-03 00:35:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:35:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:36:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:36:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:36:16] Production.INFO: count ==409 [2025-03-03 00:36:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:36:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594832', 'tblTempUsageDetail_20' ) start [2025-03-03 00:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594832', 'tblTempUsageDetail_20' ) end [2025-03-03 00:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594832', 'tblTempVendorCDR_20' ) start [2025-03-03 00:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594832', 'tblTempVendorCDR_20' ) end [2025-03-03 00:36:16] Production.INFO: ProcessCDR(1,14594832,1,1,2) [2025-03-03 00:36:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594832,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:36:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594832,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:36:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594832,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:36:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594832,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:36:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594832', 'tblTempUsageDetail_20' ) start [2025-03-03 00:36:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594832', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:36:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:36:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:36:24] Production.INFO: ==22060== Releasing lock... [2025-03-03 00:36:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:36:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:37:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:37:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:37:16] Production.INFO: count ==409 [2025-03-03 00:37:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:37:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:37:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594837', 'tblTempUsageDetail_20' ) start [2025-03-03 00:37:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594837', 'tblTempUsageDetail_20' ) end [2025-03-03 00:37:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594837', 'tblTempVendorCDR_20' ) start [2025-03-03 00:37:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594837', 'tblTempVendorCDR_20' ) end [2025-03-03 00:37:16] Production.INFO: ProcessCDR(1,14594837,1,1,2) [2025-03-03 00:37:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594837,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:37:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594837,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:37:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594837,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:37:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594837,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594837', 'tblTempUsageDetail_20' ) start [2025-03-03 00:37:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594837', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:37:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:37:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:37:24] Production.INFO: ==22140== Releasing lock... [2025-03-03 00:37:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:37:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:38:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:38:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:38:16] Production.INFO: count ==409 [2025-03-03 00:38:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:38:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594842', 'tblTempUsageDetail_20' ) start [2025-03-03 00:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594842', 'tblTempUsageDetail_20' ) end [2025-03-03 00:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594842', 'tblTempVendorCDR_20' ) start [2025-03-03 00:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594842', 'tblTempVendorCDR_20' ) end [2025-03-03 00:38:16] Production.INFO: ProcessCDR(1,14594842,1,1,2) [2025-03-03 00:38:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594842,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:38:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594842,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:38:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594842,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:38:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594842,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594842', 'tblTempUsageDetail_20' ) start [2025-03-03 00:38:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594842', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:38:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:38:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:38:24] Production.INFO: ==22215== Releasing lock... [2025-03-03 00:38:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:38:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:39:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:39:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:39:16] Production.INFO: count ==409 [2025-03-03 00:39:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:39:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594844', 'tblTempUsageDetail_20' ) start [2025-03-03 00:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594844', 'tblTempUsageDetail_20' ) end [2025-03-03 00:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594844', 'tblTempVendorCDR_20' ) start [2025-03-03 00:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594844', 'tblTempVendorCDR_20' ) end [2025-03-03 00:39:16] Production.INFO: ProcessCDR(1,14594844,1,1,2) [2025-03-03 00:39:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594844,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:39:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594844,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:39:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594844,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:39:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594844,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:39:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594844', 'tblTempUsageDetail_20' ) start [2025-03-03 00:39:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594844', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:39:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:39:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:39:23] Production.INFO: ==22286== Releasing lock... [2025-03-03 00:39:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:39:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:40:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:40:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:40:16] Production.INFO: count ==409 [2025-03-03 00:40:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:40:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:40:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594853', 'tblTempUsageDetail_20' ) start [2025-03-03 00:40:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594853', 'tblTempUsageDetail_20' ) end [2025-03-03 00:40:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594853', 'tblTempVendorCDR_20' ) start [2025-03-03 00:40:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594853', 'tblTempVendorCDR_20' ) end [2025-03-03 00:40:16] Production.INFO: ProcessCDR(1,14594853,1,1,2) [2025-03-03 00:40:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594853,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:40:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594853,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:40:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594853,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:40:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594853,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:40:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594853', 'tblTempUsageDetail_20' ) start [2025-03-03 00:40:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594853', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:40:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:40:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:40:24] Production.INFO: ==22365== Releasing lock... [2025-03-03 00:40:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:40:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:41:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:41:17] Production.INFO: count ==409 [2025-03-03 00:41:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:41:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594858', 'tblTempUsageDetail_20' ) start [2025-03-03 00:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594858', 'tblTempUsageDetail_20' ) end [2025-03-03 00:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594858', 'tblTempVendorCDR_20' ) start [2025-03-03 00:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594858', 'tblTempVendorCDR_20' ) end [2025-03-03 00:41:17] Production.INFO: ProcessCDR(1,14594858,1,1,2) [2025-03-03 00:41:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594858,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:41:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594858,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:41:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594858,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:41:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594858,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:41:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594858', 'tblTempUsageDetail_20' ) start [2025-03-03 00:41:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594858', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:41:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:41:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:41:24] Production.INFO: ==22450== Releasing lock... [2025-03-03 00:41:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:41:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:42:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:42:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:42:15] Production.INFO: count ==409 [2025-03-03 00:42:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:42:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594863', 'tblTempUsageDetail_20' ) start [2025-03-03 00:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594863', 'tblTempUsageDetail_20' ) end [2025-03-03 00:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594863', 'tblTempVendorCDR_20' ) start [2025-03-03 00:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594863', 'tblTempVendorCDR_20' ) end [2025-03-03 00:42:16] Production.INFO: ProcessCDR(1,14594863,1,1,2) [2025-03-03 00:42:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594863,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:42:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594863,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:42:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594863,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:42:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594863,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:42:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594863', 'tblTempUsageDetail_20' ) start [2025-03-03 00:42:22] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594863', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:42:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:42:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:42:23] Production.INFO: ==22537== Releasing lock... [2025-03-03 00:42:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:42:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:43:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:43:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:43:16] Production.INFO: count ==409 [2025-03-03 00:43:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:43:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594868', 'tblTempUsageDetail_20' ) start [2025-03-03 00:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594868', 'tblTempUsageDetail_20' ) end [2025-03-03 00:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594868', 'tblTempVendorCDR_20' ) start [2025-03-03 00:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594868', 'tblTempVendorCDR_20' ) end [2025-03-03 00:43:17] Production.INFO: ProcessCDR(1,14594868,1,1,2) [2025-03-03 00:43:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594868,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:43:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594868,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:43:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594868,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:43:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594868,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:43:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594868', 'tblTempUsageDetail_20' ) start [2025-03-03 00:43:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594868', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:43:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:43:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:43:24] Production.INFO: ==22621== Releasing lock... [2025-03-03 00:43:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:43:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:44:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:44:17] Production.INFO: count ==409 [2025-03-03 00:44:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:44:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594873', 'tblTempUsageDetail_20' ) start [2025-03-03 00:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594873', 'tblTempUsageDetail_20' ) end [2025-03-03 00:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594873', 'tblTempVendorCDR_20' ) start [2025-03-03 00:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594873', 'tblTempVendorCDR_20' ) end [2025-03-03 00:44:17] Production.INFO: ProcessCDR(1,14594873,1,1,2) [2025-03-03 00:44:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594873,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:44:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594873,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:44:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594873,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:44:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594873,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594873', 'tblTempUsageDetail_20' ) start [2025-03-03 00:44:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594873', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:44:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:44:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:44:24] Production.INFO: ==22697== Releasing lock... [2025-03-03 00:44:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:44:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:45:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:45:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:45:16] Production.INFO: count ==409 [2025-03-03 00:45:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:45:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594878', 'tblTempUsageDetail_20' ) start [2025-03-03 00:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594878', 'tblTempUsageDetail_20' ) end [2025-03-03 00:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594878', 'tblTempVendorCDR_20' ) start [2025-03-03 00:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594878', 'tblTempVendorCDR_20' ) end [2025-03-03 00:45:16] Production.INFO: ProcessCDR(1,14594878,1,1,2) [2025-03-03 00:45:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594878,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:45:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594878,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:45:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594878,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:45:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594878,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:45:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594878', 'tblTempUsageDetail_20' ) start [2025-03-03 00:45:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594878', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:45:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:45:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:45:23] Production.INFO: ==22771== Releasing lock... [2025-03-03 00:45:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:45:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:46:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:46:17] Production.INFO: count ==409 [2025-03-03 00:46:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:46:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594883', 'tblTempUsageDetail_20' ) start [2025-03-03 00:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594883', 'tblTempUsageDetail_20' ) end [2025-03-03 00:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594883', 'tblTempVendorCDR_20' ) start [2025-03-03 00:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594883', 'tblTempVendorCDR_20' ) end [2025-03-03 00:46:17] Production.INFO: ProcessCDR(1,14594883,1,1,2) [2025-03-03 00:46:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594883,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:46:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594883,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:46:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594883,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:46:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594883,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:46:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594883', 'tblTempUsageDetail_20' ) start [2025-03-03 00:46:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594883', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:46:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:46:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:46:25] Production.INFO: ==22852== Releasing lock... [2025-03-03 00:46:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:46:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:47:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:47:16] Production.INFO: count ==409 [2025-03-03 00:47:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:47:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594888', 'tblTempUsageDetail_20' ) start [2025-03-03 00:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594888', 'tblTempUsageDetail_20' ) end [2025-03-03 00:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594888', 'tblTempVendorCDR_20' ) start [2025-03-03 00:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594888', 'tblTempVendorCDR_20' ) end [2025-03-03 00:47:16] Production.INFO: ProcessCDR(1,14594888,1,1,2) [2025-03-03 00:47:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594888,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:47:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594888,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:47:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594888,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:47:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594888,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:47:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594888', 'tblTempUsageDetail_20' ) start [2025-03-03 00:47:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594888', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:47:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:47:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:47:24] Production.INFO: ==22937== Releasing lock... [2025-03-03 00:47:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:47:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:48:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:48:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:48:16] Production.INFO: count ==409 [2025-03-03 00:48:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:48:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594893', 'tblTempUsageDetail_20' ) start [2025-03-03 00:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594893', 'tblTempUsageDetail_20' ) end [2025-03-03 00:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594893', 'tblTempVendorCDR_20' ) start [2025-03-03 00:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594893', 'tblTempVendorCDR_20' ) end [2025-03-03 00:48:16] Production.INFO: ProcessCDR(1,14594893,1,1,2) [2025-03-03 00:48:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594893,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:48:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594893,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:48:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594893,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:48:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594893,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:48:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594893', 'tblTempUsageDetail_20' ) start [2025-03-03 00:48:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594893', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:48:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:48:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:48:24] Production.INFO: ==23027== Releasing lock... [2025-03-03 00:48:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:48:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:49:03] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:49:03] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:49:15] Production.INFO: count ==409 [2025-03-03 00:49:15] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:49:15] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:49:15] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594898', 'tblTempUsageDetail_20' ) start [2025-03-03 00:49:15] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594898', 'tblTempUsageDetail_20' ) end [2025-03-03 00:49:15] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594898', 'tblTempVendorCDR_20' ) start [2025-03-03 00:49:15] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594898', 'tblTempVendorCDR_20' ) end [2025-03-03 00:49:15] Production.INFO: ProcessCDR(1,14594898,1,1,2) [2025-03-03 00:49:15] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594898,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:49:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594898,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:49:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594898,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:49:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594898,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:49:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594898', 'tblTempUsageDetail_20' ) start [2025-03-03 00:49:22] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594898', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:49:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:49:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:49:23] Production.INFO: ==23106== Releasing lock... [2025-03-03 00:49:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:49:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:50:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:50:17] Production.INFO: count ==409 [2025-03-03 00:50:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:50:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594904', 'tblTempUsageDetail_20' ) start [2025-03-03 00:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594904', 'tblTempUsageDetail_20' ) end [2025-03-03 00:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594904', 'tblTempVendorCDR_20' ) start [2025-03-03 00:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594904', 'tblTempVendorCDR_20' ) end [2025-03-03 00:50:17] Production.INFO: ProcessCDR(1,14594904,1,1,2) [2025-03-03 00:50:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594904,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:50:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594904,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:50:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594904,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:50:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594904,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:50:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594904', 'tblTempUsageDetail_20' ) start [2025-03-03 00:50:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594904', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:50:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:50:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:50:25] Production.INFO: ==23197== Releasing lock... [2025-03-03 00:50:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:50:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:51:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:51:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:51:16] Production.INFO: count ==409 [2025-03-03 00:51:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:51:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594909', 'tblTempUsageDetail_20' ) start [2025-03-03 00:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594909', 'tblTempUsageDetail_20' ) end [2025-03-03 00:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594909', 'tblTempVendorCDR_20' ) start [2025-03-03 00:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594909', 'tblTempVendorCDR_20' ) end [2025-03-03 00:51:16] Production.INFO: ProcessCDR(1,14594909,1,1,2) [2025-03-03 00:51:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594909,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:51:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594909,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:51:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594909,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:51:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594909,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:51:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594909', 'tblTempUsageDetail_20' ) start [2025-03-03 00:51:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594909', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:51:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:51:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:51:24] Production.INFO: ==23309== Releasing lock... [2025-03-03 00:51:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:51:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:52:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:52:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:52:16] Production.INFO: count ==409 [2025-03-03 00:52:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:52:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:52:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594914', 'tblTempUsageDetail_20' ) start [2025-03-03 00:52:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594914', 'tblTempUsageDetail_20' ) end [2025-03-03 00:52:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594914', 'tblTempVendorCDR_20' ) start [2025-03-03 00:52:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594914', 'tblTempVendorCDR_20' ) end [2025-03-03 00:52:16] Production.INFO: ProcessCDR(1,14594914,1,1,2) [2025-03-03 00:52:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594914,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:52:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594914,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:52:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594914,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:52:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594914,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:52:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594914', 'tblTempUsageDetail_20' ) start [2025-03-03 00:52:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594914', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:52:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:52:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:52:24] Production.INFO: ==23389== Releasing lock... [2025-03-03 00:52:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:52:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:53:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:53:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:53:16] Production.INFO: count ==409 [2025-03-03 00:53:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:53:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594919', 'tblTempUsageDetail_20' ) start [2025-03-03 00:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594919', 'tblTempUsageDetail_20' ) end [2025-03-03 00:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594919', 'tblTempVendorCDR_20' ) start [2025-03-03 00:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594919', 'tblTempVendorCDR_20' ) end [2025-03-03 00:53:16] Production.INFO: ProcessCDR(1,14594919,1,1,2) [2025-03-03 00:53:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594919,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:53:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594919,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:53:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594919,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:53:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594919,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594919', 'tblTempUsageDetail_20' ) start [2025-03-03 00:53:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594919', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:53:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:53:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:53:23] Production.INFO: ==23474== Releasing lock... [2025-03-03 00:53:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:53:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:54:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:54:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:54:16] Production.INFO: count ==409 [2025-03-03 00:54:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:54:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:54:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594922', 'tblTempUsageDetail_20' ) start [2025-03-03 00:54:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594922', 'tblTempUsageDetail_20' ) end [2025-03-03 00:54:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594922', 'tblTempVendorCDR_20' ) start [2025-03-03 00:54:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594922', 'tblTempVendorCDR_20' ) end [2025-03-03 00:54:16] Production.INFO: ProcessCDR(1,14594922,1,1,2) [2025-03-03 00:54:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594922,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:54:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594922,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:54:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594922,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:54:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594922,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:54:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594922', 'tblTempUsageDetail_20' ) start [2025-03-03 00:54:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594922', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:54:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:54:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:54:24] Production.INFO: ==23556== Releasing lock... [2025-03-03 00:54:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:54:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:55:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:55:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:55:16] Production.INFO: count ==409 [2025-03-03 00:55:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:55:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594929', 'tblTempUsageDetail_20' ) start [2025-03-03 00:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594929', 'tblTempUsageDetail_20' ) end [2025-03-03 00:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594929', 'tblTempVendorCDR_20' ) start [2025-03-03 00:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594929', 'tblTempVendorCDR_20' ) end [2025-03-03 00:55:16] Production.INFO: ProcessCDR(1,14594929,1,1,2) [2025-03-03 00:55:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594929,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:55:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594929,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:55:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594929,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:55:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594929,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594929', 'tblTempUsageDetail_20' ) start [2025-03-03 00:55:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594929', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:55:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:55:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:55:24] Production.INFO: ==23632== Releasing lock... [2025-03-03 00:55:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:55:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:56:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:56:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:56:17] Production.INFO: count ==409 [2025-03-03 00:56:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:56:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594934', 'tblTempUsageDetail_20' ) start [2025-03-03 00:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594934', 'tblTempUsageDetail_20' ) end [2025-03-03 00:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594934', 'tblTempVendorCDR_20' ) start [2025-03-03 00:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594934', 'tblTempVendorCDR_20' ) end [2025-03-03 00:56:17] Production.INFO: ProcessCDR(1,14594934,1,1,2) [2025-03-03 00:56:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594934,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:56:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594934,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:56:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594934,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:56:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594934,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:56:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594934', 'tblTempUsageDetail_20' ) start [2025-03-03 00:56:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594934', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:56:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:56:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:56:24] Production.INFO: ==23713== Releasing lock... [2025-03-03 00:56:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:56:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:57:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:57:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:57:16] Production.INFO: count ==409 [2025-03-03 00:57:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:57:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594939', 'tblTempUsageDetail_20' ) start [2025-03-03 00:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594939', 'tblTempUsageDetail_20' ) end [2025-03-03 00:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594939', 'tblTempVendorCDR_20' ) start [2025-03-03 00:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594939', 'tblTempVendorCDR_20' ) end [2025-03-03 00:57:16] Production.INFO: ProcessCDR(1,14594939,1,1,2) [2025-03-03 00:57:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594939,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:57:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594939,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:57:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594939,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:57:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594939,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:57:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594939', 'tblTempUsageDetail_20' ) start [2025-03-03 00:57:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594939', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:57:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:57:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:57:24] Production.INFO: ==23790== Releasing lock... [2025-03-03 00:57:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:57:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:58:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:58:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:58:16] Production.INFO: count ==409 [2025-03-03 00:58:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:58:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594942', 'tblTempUsageDetail_20' ) start [2025-03-03 00:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594942', 'tblTempUsageDetail_20' ) end [2025-03-03 00:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594942', 'tblTempVendorCDR_20' ) start [2025-03-03 00:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594942', 'tblTempVendorCDR_20' ) end [2025-03-03 00:58:16] Production.INFO: ProcessCDR(1,14594942,1,1,2) [2025-03-03 00:58:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594942,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:58:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594942,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:58:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594942,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:58:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594942,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:58:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594942', 'tblTempUsageDetail_20' ) start [2025-03-03 00:58:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594942', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:58:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:58:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:58:24] Production.INFO: ==23865== Releasing lock... [2025-03-03 00:58:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:58:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 00:59:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 00:59:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 00:59:16] Production.INFO: count ==409 [2025-03-03 00:59:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 00:59:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 00:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594949', 'tblTempUsageDetail_20' ) start [2025-03-03 00:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594949', 'tblTempUsageDetail_20' ) end [2025-03-03 00:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594949', 'tblTempVendorCDR_20' ) start [2025-03-03 00:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594949', 'tblTempVendorCDR_20' ) end [2025-03-03 00:59:16] Production.INFO: ProcessCDR(1,14594949,1,1,2) [2025-03-03 00:59:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594949,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:59:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594949,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 00:59:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594949,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:59:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594949,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 00:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594949', 'tblTempUsageDetail_20' ) start [2025-03-03 00:59:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594949', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 00:59:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 00:59:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 00:59:24] Production.INFO: ==23938== Releasing lock... [2025-03-03 00:59:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 00:59:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:00:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:00:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:00:17] Production.INFO: count ==409 [2025-03-03 01:00:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:00:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594955', 'tblTempUsageDetail_20' ) start [2025-03-03 01:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594955', 'tblTempUsageDetail_20' ) end [2025-03-03 01:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594955', 'tblTempVendorCDR_20' ) start [2025-03-03 01:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594955', 'tblTempVendorCDR_20' ) end [2025-03-03 01:00:17] Production.INFO: ProcessCDR(1,14594955,1,1,2) [2025-03-03 01:00:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594955,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:00:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594955,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:00:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594955,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:00:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594955,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:00:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594955', 'tblTempUsageDetail_20' ) start [2025-03-03 01:00:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594955', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:00:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:00:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:00:24] Production.INFO: ==24019== Releasing lock... [2025-03-03 01:00:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:00:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:01:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:01:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:01:16] Production.INFO: count ==409 [2025-03-03 01:01:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:01:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594960', 'tblTempUsageDetail_20' ) start [2025-03-03 01:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594960', 'tblTempUsageDetail_20' ) end [2025-03-03 01:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594960', 'tblTempVendorCDR_20' ) start [2025-03-03 01:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594960', 'tblTempVendorCDR_20' ) end [2025-03-03 01:01:17] Production.INFO: ProcessCDR(1,14594960,1,1,2) [2025-03-03 01:01:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594960,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:01:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594960,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:01:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594960,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:01:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594960,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:01:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594960', 'tblTempUsageDetail_20' ) start [2025-03-03 01:01:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594960', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:01:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:01:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:01:25] Production.INFO: ==24110== Releasing lock... [2025-03-03 01:01:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:01:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:02:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:02:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:02:16] Production.INFO: count ==409 [2025-03-03 01:02:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:02:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:02:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594965', 'tblTempUsageDetail_20' ) start [2025-03-03 01:02:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594965', 'tblTempUsageDetail_20' ) end [2025-03-03 01:02:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594965', 'tblTempVendorCDR_20' ) start [2025-03-03 01:02:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594965', 'tblTempVendorCDR_20' ) end [2025-03-03 01:02:16] Production.INFO: ProcessCDR(1,14594965,1,1,2) [2025-03-03 01:02:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594965,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:02:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594965,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:02:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594965,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:02:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594965,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:02:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594965', 'tblTempUsageDetail_20' ) start [2025-03-03 01:02:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594965', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:02:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:02:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:02:24] Production.INFO: ==24189== Releasing lock... [2025-03-03 01:02:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:02:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:03:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:03:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:03:16] Production.INFO: count ==409 [2025-03-03 01:03:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:03:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:03:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594970', 'tblTempUsageDetail_20' ) start [2025-03-03 01:03:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594970', 'tblTempUsageDetail_20' ) end [2025-03-03 01:03:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594970', 'tblTempVendorCDR_20' ) start [2025-03-03 01:03:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594970', 'tblTempVendorCDR_20' ) end [2025-03-03 01:03:16] Production.INFO: ProcessCDR(1,14594970,1,1,2) [2025-03-03 01:03:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594970,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:03:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594970,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:03:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594970,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:03:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594970,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:03:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594970', 'tblTempUsageDetail_20' ) start [2025-03-03 01:03:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594970', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:03:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:03:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:03:24] Production.INFO: ==24279== Releasing lock... [2025-03-03 01:03:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:03:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:04:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:04:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:04:16] Production.INFO: count ==409 [2025-03-03 01:04:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:04:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594975', 'tblTempUsageDetail_20' ) start [2025-03-03 01:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594975', 'tblTempUsageDetail_20' ) end [2025-03-03 01:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594975', 'tblTempVendorCDR_20' ) start [2025-03-03 01:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594975', 'tblTempVendorCDR_20' ) end [2025-03-03 01:04:17] Production.INFO: ProcessCDR(1,14594975,1,1,2) [2025-03-03 01:04:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594975,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:04:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594975,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:04:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594975,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:04:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594975,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:04:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594975', 'tblTempUsageDetail_20' ) start [2025-03-03 01:04:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594975', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:04:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:04:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:04:24] Production.INFO: ==24358== Releasing lock... [2025-03-03 01:04:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:04:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:05:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:05:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:05:16] Production.INFO: count ==409 [2025-03-03 01:05:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:05:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594980', 'tblTempUsageDetail_20' ) start [2025-03-03 01:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594980', 'tblTempUsageDetail_20' ) end [2025-03-03 01:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594980', 'tblTempVendorCDR_20' ) start [2025-03-03 01:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594980', 'tblTempVendorCDR_20' ) end [2025-03-03 01:05:16] Production.INFO: ProcessCDR(1,14594980,1,1,2) [2025-03-03 01:05:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594980,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:05:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594980,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:05:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594980,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:05:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594980,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:05:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594980', 'tblTempUsageDetail_20' ) start [2025-03-03 01:05:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594980', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:05:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:05:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:05:24] Production.INFO: ==24438== Releasing lock... [2025-03-03 01:05:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:05:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:06:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:06:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:06:16] Production.INFO: count ==409 [2025-03-03 01:06:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:06:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594985', 'tblTempUsageDetail_20' ) start [2025-03-03 01:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594985', 'tblTempUsageDetail_20' ) end [2025-03-03 01:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594985', 'tblTempVendorCDR_20' ) start [2025-03-03 01:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594985', 'tblTempVendorCDR_20' ) end [2025-03-03 01:06:17] Production.INFO: ProcessCDR(1,14594985,1,1,2) [2025-03-03 01:06:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594985,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:06:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594985,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:06:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594985,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:06:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594985,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:06:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594985', 'tblTempUsageDetail_20' ) start [2025-03-03 01:06:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594985', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:06:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:06:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:06:24] Production.INFO: ==24516== Releasing lock... [2025-03-03 01:06:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:06:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:07:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:07:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:07:16] Production.INFO: count ==409 [2025-03-03 01:07:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:07:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594990', 'tblTempUsageDetail_20' ) start [2025-03-03 01:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594990', 'tblTempUsageDetail_20' ) end [2025-03-03 01:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594990', 'tblTempVendorCDR_20' ) start [2025-03-03 01:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594990', 'tblTempVendorCDR_20' ) end [2025-03-03 01:07:17] Production.INFO: ProcessCDR(1,14594990,1,1,2) [2025-03-03 01:07:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594990,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:07:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594990,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:07:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594990,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:07:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594990,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:07:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594990', 'tblTempUsageDetail_20' ) start [2025-03-03 01:07:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594990', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:07:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:07:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:07:24] Production.INFO: ==24641== Releasing lock... [2025-03-03 01:07:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:07:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:08:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:08:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:08:16] Production.INFO: count ==409 [2025-03-03 01:08:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:08:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594995', 'tblTempUsageDetail_20' ) start [2025-03-03 01:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594995', 'tblTempUsageDetail_20' ) end [2025-03-03 01:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594995', 'tblTempVendorCDR_20' ) start [2025-03-03 01:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594995', 'tblTempVendorCDR_20' ) end [2025-03-03 01:08:16] Production.INFO: ProcessCDR(1,14594995,1,1,2) [2025-03-03 01:08:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594995,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:08:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594995,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:08:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594995,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:08:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594995,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:08:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594995', 'tblTempUsageDetail_20' ) start [2025-03-03 01:08:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594995', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:08:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:08:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:08:24] Production.INFO: ==24728== Releasing lock... [2025-03-03 01:08:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:08:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:09:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:09:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:09:16] Production.INFO: count ==409 [2025-03-03 01:09:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:09:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595000', 'tblTempUsageDetail_20' ) start [2025-03-03 01:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595000', 'tblTempUsageDetail_20' ) end [2025-03-03 01:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595000', 'tblTempVendorCDR_20' ) start [2025-03-03 01:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595000', 'tblTempVendorCDR_20' ) end [2025-03-03 01:09:16] Production.INFO: ProcessCDR(1,14595000,1,1,2) [2025-03-03 01:09:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595000,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:09:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595000,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:09:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595000,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:09:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595000,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:09:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595000', 'tblTempUsageDetail_20' ) start [2025-03-03 01:09:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595000', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:09:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:09:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:09:24] Production.INFO: ==24807== Releasing lock... [2025-03-03 01:09:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:09:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:10:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:10:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:10:17] Production.INFO: count ==409 [2025-03-03 01:10:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:10:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595006', 'tblTempUsageDetail_20' ) start [2025-03-03 01:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595006', 'tblTempUsageDetail_20' ) end [2025-03-03 01:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595006', 'tblTempVendorCDR_20' ) start [2025-03-03 01:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595006', 'tblTempVendorCDR_20' ) end [2025-03-03 01:10:17] Production.INFO: ProcessCDR(1,14595006,1,1,2) [2025-03-03 01:10:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595006,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:10:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595006,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:10:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595006,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:10:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595006,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:10:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595006', 'tblTempUsageDetail_20' ) start [2025-03-03 01:10:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595006', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:10:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:10:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:10:25] Production.INFO: ==24884== Releasing lock... [2025-03-03 01:10:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:10:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:11:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:11:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:11:16] Production.INFO: count ==409 [2025-03-03 01:11:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:11:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:11:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595011', 'tblTempUsageDetail_20' ) start [2025-03-03 01:11:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595011', 'tblTempUsageDetail_20' ) end [2025-03-03 01:11:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595011', 'tblTempVendorCDR_20' ) start [2025-03-03 01:11:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595011', 'tblTempVendorCDR_20' ) end [2025-03-03 01:11:16] Production.INFO: ProcessCDR(1,14595011,1,1,2) [2025-03-03 01:11:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595011,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:11:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595011,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:11:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595011,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:11:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595011,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:11:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595011', 'tblTempUsageDetail_20' ) start [2025-03-03 01:11:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595011', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:11:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:11:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:11:24] Production.INFO: ==24967== Releasing lock... [2025-03-03 01:11:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:11:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:12:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:12:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:12:16] Production.INFO: count ==409 [2025-03-03 01:12:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:12:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595016', 'tblTempUsageDetail_20' ) start [2025-03-03 01:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595016', 'tblTempUsageDetail_20' ) end [2025-03-03 01:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595016', 'tblTempVendorCDR_20' ) start [2025-03-03 01:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595016', 'tblTempVendorCDR_20' ) end [2025-03-03 01:12:17] Production.INFO: ProcessCDR(1,14595016,1,1,2) [2025-03-03 01:12:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595016,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:12:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595016,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:12:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595016,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:12:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595016,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:12:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595016', 'tblTempUsageDetail_20' ) start [2025-03-03 01:12:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595016', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:12:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:12:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:12:24] Production.INFO: ==25047== Releasing lock... [2025-03-03 01:12:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:12:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:13:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:13:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:13:16] Production.INFO: count ==409 [2025-03-03 01:13:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:13:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:13:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595021', 'tblTempUsageDetail_20' ) start [2025-03-03 01:13:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595021', 'tblTempUsageDetail_20' ) end [2025-03-03 01:13:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595021', 'tblTempVendorCDR_20' ) start [2025-03-03 01:13:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595021', 'tblTempVendorCDR_20' ) end [2025-03-03 01:13:16] Production.INFO: ProcessCDR(1,14595021,1,1,2) [2025-03-03 01:13:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595021,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:13:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595021,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:13:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595021,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:13:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595021,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:13:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595021', 'tblTempUsageDetail_20' ) start [2025-03-03 01:13:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595021', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:13:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:13:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:13:24] Production.INFO: ==25118== Releasing lock... [2025-03-03 01:13:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:13:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:14:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:14:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:14:16] Production.INFO: count ==409 [2025-03-03 01:14:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:14:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:14:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595026', 'tblTempUsageDetail_20' ) start [2025-03-03 01:14:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595026', 'tblTempUsageDetail_20' ) end [2025-03-03 01:14:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595026', 'tblTempVendorCDR_20' ) start [2025-03-03 01:14:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595026', 'tblTempVendorCDR_20' ) end [2025-03-03 01:14:16] Production.INFO: ProcessCDR(1,14595026,1,1,2) [2025-03-03 01:14:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595026,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:14:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595026,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:14:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595026,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:14:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595026,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:14:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595026', 'tblTempUsageDetail_20' ) start [2025-03-03 01:14:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595026', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:14:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:14:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:14:24] Production.INFO: ==25205== Releasing lock... [2025-03-03 01:14:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:14:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:15:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:15:16] Production.INFO: count ==409 [2025-03-03 01:15:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:15:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595031', 'tblTempUsageDetail_20' ) start [2025-03-03 01:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595031', 'tblTempUsageDetail_20' ) end [2025-03-03 01:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595031', 'tblTempVendorCDR_20' ) start [2025-03-03 01:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595031', 'tblTempVendorCDR_20' ) end [2025-03-03 01:15:16] Production.INFO: ProcessCDR(1,14595031,1,1,2) [2025-03-03 01:15:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595031,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:15:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595031,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:15:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595031,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:15:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595031,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:15:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595031', 'tblTempUsageDetail_20' ) start [2025-03-03 01:15:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595031', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:15:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:15:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:15:24] Production.INFO: ==25278== Releasing lock... [2025-03-03 01:15:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:15:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:16:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:16:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:16:16] Production.INFO: count ==409 [2025-03-03 01:16:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:16:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595036', 'tblTempUsageDetail_20' ) start [2025-03-03 01:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595036', 'tblTempUsageDetail_20' ) end [2025-03-03 01:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595036', 'tblTempVendorCDR_20' ) start [2025-03-03 01:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595036', 'tblTempVendorCDR_20' ) end [2025-03-03 01:16:16] Production.INFO: ProcessCDR(1,14595036,1,1,2) [2025-03-03 01:16:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595036,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:16:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595036,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:16:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595036,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:16:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595036,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:16:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595036', 'tblTempUsageDetail_20' ) start [2025-03-03 01:16:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595036', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:16:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:16:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:16:24] Production.INFO: ==25364== Releasing lock... [2025-03-03 01:16:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:16:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:17:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:17:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:17:16] Production.INFO: count ==409 [2025-03-03 01:17:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:17:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595041', 'tblTempUsageDetail_20' ) start [2025-03-03 01:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595041', 'tblTempUsageDetail_20' ) end [2025-03-03 01:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595041', 'tblTempVendorCDR_20' ) start [2025-03-03 01:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595041', 'tblTempVendorCDR_20' ) end [2025-03-03 01:17:16] Production.INFO: ProcessCDR(1,14595041,1,1,2) [2025-03-03 01:17:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595041,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:17:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595041,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:17:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595041,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:17:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595041,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595041', 'tblTempUsageDetail_20' ) start [2025-03-03 01:17:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595041', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:17:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:17:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:17:23] Production.INFO: ==25449== Releasing lock... [2025-03-03 01:17:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:17:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:18:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:18:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:18:16] Production.INFO: count ==409 [2025-03-03 01:18:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:18:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595046', 'tblTempUsageDetail_20' ) start [2025-03-03 01:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595046', 'tblTempUsageDetail_20' ) end [2025-03-03 01:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595046', 'tblTempVendorCDR_20' ) start [2025-03-03 01:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595046', 'tblTempVendorCDR_20' ) end [2025-03-03 01:18:16] Production.INFO: ProcessCDR(1,14595046,1,1,2) [2025-03-03 01:18:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595046,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:18:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595046,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:18:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595046,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:18:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595046,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595046', 'tblTempUsageDetail_20' ) start [2025-03-03 01:18:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595046', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:18:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:18:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:18:24] Production.INFO: ==25528== Releasing lock... [2025-03-03 01:18:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:18:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:19:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:19:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:19:16] Production.INFO: count ==409 [2025-03-03 01:19:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:19:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595051', 'tblTempUsageDetail_20' ) start [2025-03-03 01:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595051', 'tblTempUsageDetail_20' ) end [2025-03-03 01:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595051', 'tblTempVendorCDR_20' ) start [2025-03-03 01:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595051', 'tblTempVendorCDR_20' ) end [2025-03-03 01:19:16] Production.INFO: ProcessCDR(1,14595051,1,1,2) [2025-03-03 01:19:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595051,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:19:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595051,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:19:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595051,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:19:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595051,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:19:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595051', 'tblTempUsageDetail_20' ) start [2025-03-03 01:19:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595051', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:19:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:19:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:19:23] Production.INFO: ==25617== Releasing lock... [2025-03-03 01:19:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:19:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:20:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:20:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:20:16] Production.INFO: count ==409 [2025-03-03 01:20:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:20:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595056', 'tblTempUsageDetail_20' ) start [2025-03-03 01:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595056', 'tblTempUsageDetail_20' ) end [2025-03-03 01:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595056', 'tblTempVendorCDR_20' ) start [2025-03-03 01:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595056', 'tblTempVendorCDR_20' ) end [2025-03-03 01:20:17] Production.INFO: ProcessCDR(1,14595056,1,1,2) [2025-03-03 01:20:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595056,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:20:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595056,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:20:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595056,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:20:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595056,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595056', 'tblTempUsageDetail_20' ) start [2025-03-03 01:20:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595056', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:20:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:20:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:20:25] Production.INFO: ==25702== Releasing lock... [2025-03-03 01:20:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:20:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:21:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:21:17] Production.INFO: count ==409 [2025-03-03 01:21:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:21:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595062', 'tblTempUsageDetail_20' ) start [2025-03-03 01:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595062', 'tblTempUsageDetail_20' ) end [2025-03-03 01:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595062', 'tblTempVendorCDR_20' ) start [2025-03-03 01:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595062', 'tblTempVendorCDR_20' ) end [2025-03-03 01:21:17] Production.INFO: ProcessCDR(1,14595062,1,1,2) [2025-03-03 01:21:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595062,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:21:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595062,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:21:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595062,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:21:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595062,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:21:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595062', 'tblTempUsageDetail_20' ) start [2025-03-03 01:21:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595062', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:21:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:21:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:21:24] Production.INFO: ==25793== Releasing lock... [2025-03-03 01:21:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:21:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:22:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:22:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:22:16] Production.INFO: count ==409 [2025-03-03 01:22:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:22:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:22:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595067', 'tblTempUsageDetail_20' ) start [2025-03-03 01:22:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595067', 'tblTempUsageDetail_20' ) end [2025-03-03 01:22:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595067', 'tblTempVendorCDR_20' ) start [2025-03-03 01:22:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595067', 'tblTempVendorCDR_20' ) end [2025-03-03 01:22:16] Production.INFO: ProcessCDR(1,14595067,1,1,2) [2025-03-03 01:22:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595067,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:22:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595067,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:22:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595067,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:22:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595067,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595067', 'tblTempUsageDetail_20' ) start [2025-03-03 01:22:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595067', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:22:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:22:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:22:24] Production.INFO: ==25931== Releasing lock... [2025-03-03 01:22:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:22:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:23:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:23:17] Production.INFO: count ==409 [2025-03-03 01:23:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:23:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595072', 'tblTempUsageDetail_20' ) start [2025-03-03 01:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595072', 'tblTempUsageDetail_20' ) end [2025-03-03 01:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595072', 'tblTempVendorCDR_20' ) start [2025-03-03 01:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595072', 'tblTempVendorCDR_20' ) end [2025-03-03 01:23:17] Production.INFO: ProcessCDR(1,14595072,1,1,2) [2025-03-03 01:23:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595072,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:23:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595072,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:23:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595072,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:23:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595072,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:23:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595072', 'tblTempUsageDetail_20' ) start [2025-03-03 01:23:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595072', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:23:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:23:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:23:25] Production.INFO: ==26023== Releasing lock... [2025-03-03 01:23:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:23:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:24:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:24:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:24:16] Production.INFO: count ==409 [2025-03-03 01:24:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:24:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:24:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595077', 'tblTempUsageDetail_20' ) start [2025-03-03 01:24:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595077', 'tblTempUsageDetail_20' ) end [2025-03-03 01:24:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595077', 'tblTempVendorCDR_20' ) start [2025-03-03 01:24:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595077', 'tblTempVendorCDR_20' ) end [2025-03-03 01:24:16] Production.INFO: ProcessCDR(1,14595077,1,1,2) [2025-03-03 01:24:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595077,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:24:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595077,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:24:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595077,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:24:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595077,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595077', 'tblTempUsageDetail_20' ) start [2025-03-03 01:24:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595077', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:24:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:24:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:24:24] Production.INFO: ==26109== Releasing lock... [2025-03-03 01:24:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:24:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:25:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:25:17] Production.INFO: count ==409 [2025-03-03 01:25:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:25:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595082', 'tblTempUsageDetail_20' ) start [2025-03-03 01:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595082', 'tblTempUsageDetail_20' ) end [2025-03-03 01:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595082', 'tblTempVendorCDR_20' ) start [2025-03-03 01:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595082', 'tblTempVendorCDR_20' ) end [2025-03-03 01:25:17] Production.INFO: ProcessCDR(1,14595082,1,1,2) [2025-03-03 01:25:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595082,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:25:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595082,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:25:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595082,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:25:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595082,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:25:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595082', 'tblTempUsageDetail_20' ) start [2025-03-03 01:25:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595082', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:25:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:25:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:25:25] Production.INFO: ==26189== Releasing lock... [2025-03-03 01:25:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:25:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:26:17] Production.INFO: count ==409 [2025-03-03 01:26:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:26:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595087', 'tblTempUsageDetail_20' ) start [2025-03-03 01:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595087', 'tblTempUsageDetail_20' ) end [2025-03-03 01:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595087', 'tblTempVendorCDR_20' ) start [2025-03-03 01:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595087', 'tblTempVendorCDR_20' ) end [2025-03-03 01:26:17] Production.INFO: ProcessCDR(1,14595087,1,1,2) [2025-03-03 01:26:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595087,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:26:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595087,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:26:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595087,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:26:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595087,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:26:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595087', 'tblTempUsageDetail_20' ) start [2025-03-03 01:26:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595087', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:26:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:26:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:26:24] Production.INFO: ==26276== Releasing lock... [2025-03-03 01:26:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:26:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:27:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:27:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:27:16] Production.INFO: count ==409 [2025-03-03 01:27:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:27:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595092', 'tblTempUsageDetail_20' ) start [2025-03-03 01:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595092', 'tblTempUsageDetail_20' ) end [2025-03-03 01:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595092', 'tblTempVendorCDR_20' ) start [2025-03-03 01:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595092', 'tblTempVendorCDR_20' ) end [2025-03-03 01:27:16] Production.INFO: ProcessCDR(1,14595092,1,1,2) [2025-03-03 01:27:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595092,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:27:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595092,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:27:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595092,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:27:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595092,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:27:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595092', 'tblTempUsageDetail_20' ) start [2025-03-03 01:27:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595092', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:27:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:27:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:27:24] Production.INFO: ==26360== Releasing lock... [2025-03-03 01:27:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:27:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:28:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:28:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:28:16] Production.INFO: count ==409 [2025-03-03 01:28:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:28:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:28:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595097', 'tblTempUsageDetail_20' ) start [2025-03-03 01:28:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595097', 'tblTempUsageDetail_20' ) end [2025-03-03 01:28:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595097', 'tblTempVendorCDR_20' ) start [2025-03-03 01:28:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595097', 'tblTempVendorCDR_20' ) end [2025-03-03 01:28:16] Production.INFO: ProcessCDR(1,14595097,1,1,2) [2025-03-03 01:28:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595097,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:28:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595097,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:28:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595097,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:28:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595097,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:28:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595097', 'tblTempUsageDetail_20' ) start [2025-03-03 01:28:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595097', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:28:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:28:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:28:24] Production.INFO: ==26430== Releasing lock... [2025-03-03 01:28:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:28:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:29:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:29:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:29:16] Production.INFO: count ==409 [2025-03-03 01:29:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:29:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595102', 'tblTempUsageDetail_20' ) start [2025-03-03 01:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595102', 'tblTempUsageDetail_20' ) end [2025-03-03 01:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595102', 'tblTempVendorCDR_20' ) start [2025-03-03 01:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595102', 'tblTempVendorCDR_20' ) end [2025-03-03 01:29:16] Production.INFO: ProcessCDR(1,14595102,1,1,2) [2025-03-03 01:29:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595102,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:29:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595102,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:29:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595102,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:29:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595102,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:29:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595102', 'tblTempUsageDetail_20' ) start [2025-03-03 01:29:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595102', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:29:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:29:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:29:24] Production.INFO: ==26502== Releasing lock... [2025-03-03 01:29:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:29:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:30:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:30:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:30:16] Production.INFO: count ==409 [2025-03-03 01:30:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:30:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:30:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595108', 'tblTempUsageDetail_20' ) start [2025-03-03 01:30:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595108', 'tblTempUsageDetail_20' ) end [2025-03-03 01:30:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595108', 'tblTempVendorCDR_20' ) start [2025-03-03 01:30:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595108', 'tblTempVendorCDR_20' ) end [2025-03-03 01:30:16] Production.INFO: ProcessCDR(1,14595108,1,1,2) [2025-03-03 01:30:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595108,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:30:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595108,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:30:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595108,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:30:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595108,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:30:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595108', 'tblTempUsageDetail_20' ) start [2025-03-03 01:30:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595108', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:30:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:30:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:30:24] Production.INFO: ==26591== Releasing lock... [2025-03-03 01:30:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:30:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:31:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:31:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:31:16] Production.INFO: count ==409 [2025-03-03 01:31:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:31:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595113', 'tblTempUsageDetail_20' ) start [2025-03-03 01:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595113', 'tblTempUsageDetail_20' ) end [2025-03-03 01:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595113', 'tblTempVendorCDR_20' ) start [2025-03-03 01:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595113', 'tblTempVendorCDR_20' ) end [2025-03-03 01:31:17] Production.INFO: ProcessCDR(1,14595113,1,1,2) [2025-03-03 01:31:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595113,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:31:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595113,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:31:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595113,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:31:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595113,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:31:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595113', 'tblTempUsageDetail_20' ) start [2025-03-03 01:31:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595113', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:31:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:31:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:31:24] Production.INFO: ==26669== Releasing lock... [2025-03-03 01:31:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:31:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:32:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:32:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:32:16] Production.INFO: count ==409 [2025-03-03 01:32:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:32:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595118', 'tblTempUsageDetail_20' ) start [2025-03-03 01:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595118', 'tblTempUsageDetail_20' ) end [2025-03-03 01:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595118', 'tblTempVendorCDR_20' ) start [2025-03-03 01:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595118', 'tblTempVendorCDR_20' ) end [2025-03-03 01:32:16] Production.INFO: ProcessCDR(1,14595118,1,1,2) [2025-03-03 01:32:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595118,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:32:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595118,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:32:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595118,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:32:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595118,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:32:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595118', 'tblTempUsageDetail_20' ) start [2025-03-03 01:32:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595118', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:32:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:32:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:32:23] Production.INFO: ==26746== Releasing lock... [2025-03-03 01:32:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:32:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:33:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:33:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:33:16] Production.INFO: count ==409 [2025-03-03 01:33:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:33:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595123', 'tblTempUsageDetail_20' ) start [2025-03-03 01:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595123', 'tblTempUsageDetail_20' ) end [2025-03-03 01:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595123', 'tblTempVendorCDR_20' ) start [2025-03-03 01:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595123', 'tblTempVendorCDR_20' ) end [2025-03-03 01:33:16] Production.INFO: ProcessCDR(1,14595123,1,1,2) [2025-03-03 01:33:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595123,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:33:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595123,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:33:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595123,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:33:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595123,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:33:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595123', 'tblTempUsageDetail_20' ) start [2025-03-03 01:33:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595123', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:33:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:33:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:33:24] Production.INFO: ==26835== Releasing lock... [2025-03-03 01:33:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:33:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:34:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:34:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:34:16] Production.INFO: count ==409 [2025-03-03 01:34:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:34:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595128', 'tblTempUsageDetail_20' ) start [2025-03-03 01:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595128', 'tblTempUsageDetail_20' ) end [2025-03-03 01:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595128', 'tblTempVendorCDR_20' ) start [2025-03-03 01:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595128', 'tblTempVendorCDR_20' ) end [2025-03-03 01:34:16] Production.INFO: ProcessCDR(1,14595128,1,1,2) [2025-03-03 01:34:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595128,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:34:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595128,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:34:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595128,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:34:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595128,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:34:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595128', 'tblTempUsageDetail_20' ) start [2025-03-03 01:34:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595128', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:34:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:34:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:34:25] Production.INFO: ==26910== Releasing lock... [2025-03-03 01:34:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:34:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:35:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:35:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:35:16] Production.INFO: count ==409 [2025-03-03 01:35:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:35:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595133', 'tblTempUsageDetail_20' ) start [2025-03-03 01:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595133', 'tblTempUsageDetail_20' ) end [2025-03-03 01:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595133', 'tblTempVendorCDR_20' ) start [2025-03-03 01:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595133', 'tblTempVendorCDR_20' ) end [2025-03-03 01:35:17] Production.INFO: ProcessCDR(1,14595133,1,1,2) [2025-03-03 01:35:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595133,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:35:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595133,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:35:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595133,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:35:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595133,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:35:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595133', 'tblTempUsageDetail_20' ) start [2025-03-03 01:35:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595133', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:35:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:35:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:35:25] Production.INFO: ==26983== Releasing lock... [2025-03-03 01:35:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:35:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:36:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:36:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:36:17] Production.INFO: count ==409 [2025-03-03 01:36:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:36:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595138', 'tblTempUsageDetail_20' ) start [2025-03-03 01:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595138', 'tblTempUsageDetail_20' ) end [2025-03-03 01:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595138', 'tblTempVendorCDR_20' ) start [2025-03-03 01:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595138', 'tblTempVendorCDR_20' ) end [2025-03-03 01:36:17] Production.INFO: ProcessCDR(1,14595138,1,1,2) [2025-03-03 01:36:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595138,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:36:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595138,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:36:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595138,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:36:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595138,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:36:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595138', 'tblTempUsageDetail_20' ) start [2025-03-03 01:36:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595138', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:36:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:36:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:36:26] Production.INFO: ==27062== Releasing lock... [2025-03-03 01:36:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:36:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:37:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:37:16] Production.INFO: count ==409 [2025-03-03 01:37:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:37:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595143', 'tblTempUsageDetail_20' ) start [2025-03-03 01:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595143', 'tblTempUsageDetail_20' ) end [2025-03-03 01:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595143', 'tblTempVendorCDR_20' ) start [2025-03-03 01:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595143', 'tblTempVendorCDR_20' ) end [2025-03-03 01:37:17] Production.INFO: ProcessCDR(1,14595143,1,1,2) [2025-03-03 01:37:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595143,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:37:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595143,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:37:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595143,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:37:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595143,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:37:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595143', 'tblTempUsageDetail_20' ) start [2025-03-03 01:37:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595143', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:37:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:37:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:37:25] Production.INFO: ==27139== Releasing lock... [2025-03-03 01:37:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:37:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:38:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:38:17] Production.INFO: count ==409 [2025-03-03 01:38:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:38:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595148', 'tblTempUsageDetail_20' ) start [2025-03-03 01:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595148', 'tblTempUsageDetail_20' ) end [2025-03-03 01:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595148', 'tblTempVendorCDR_20' ) start [2025-03-03 01:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595148', 'tblTempVendorCDR_20' ) end [2025-03-03 01:38:17] Production.INFO: ProcessCDR(1,14595148,1,1,2) [2025-03-03 01:38:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595148,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:38:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595148,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:38:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595148,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:38:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595148,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:38:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595148', 'tblTempUsageDetail_20' ) start [2025-03-03 01:38:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595148', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:38:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:38:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:38:26] Production.INFO: ==27254== Releasing lock... [2025-03-03 01:38:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:38:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:39:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:39:16] Production.INFO: count ==409 [2025-03-03 01:39:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:39:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595153', 'tblTempUsageDetail_20' ) start [2025-03-03 01:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595153', 'tblTempUsageDetail_20' ) end [2025-03-03 01:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595153', 'tblTempVendorCDR_20' ) start [2025-03-03 01:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595153', 'tblTempVendorCDR_20' ) end [2025-03-03 01:39:17] Production.INFO: ProcessCDR(1,14595153,1,1,2) [2025-03-03 01:39:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595153,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:39:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595153,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:39:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595153,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:39:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595153,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:39:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595153', 'tblTempUsageDetail_20' ) start [2025-03-03 01:39:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595153', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:39:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:39:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:39:25] Production.INFO: ==27335== Releasing lock... [2025-03-03 01:39:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:39:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:40:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:40:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:40:17] Production.INFO: count ==409 [2025-03-03 01:40:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:40:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595158', 'tblTempUsageDetail_20' ) start [2025-03-03 01:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595158', 'tblTempUsageDetail_20' ) end [2025-03-03 01:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595158', 'tblTempVendorCDR_20' ) start [2025-03-03 01:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595158', 'tblTempVendorCDR_20' ) end [2025-03-03 01:40:18] Production.INFO: ProcessCDR(1,14595158,1,1,2) [2025-03-03 01:40:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595158,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:40:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595158,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:40:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595158,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:40:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595158,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:40:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595158', 'tblTempUsageDetail_20' ) start [2025-03-03 01:40:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595158', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:40:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:40:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:40:26] Production.INFO: ==27417== Releasing lock... [2025-03-03 01:40:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:40:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:41:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:41:16] Production.INFO: count ==409 [2025-03-03 01:41:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:41:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595164', 'tblTempUsageDetail_20' ) start [2025-03-03 01:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595164', 'tblTempUsageDetail_20' ) end [2025-03-03 01:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595164', 'tblTempVendorCDR_20' ) start [2025-03-03 01:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595164', 'tblTempVendorCDR_20' ) end [2025-03-03 01:41:16] Production.INFO: ProcessCDR(1,14595164,1,1,2) [2025-03-03 01:41:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595164,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:41:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595164,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:41:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595164,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:41:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595164,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:41:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595164', 'tblTempUsageDetail_20' ) start [2025-03-03 01:41:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595164', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:41:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:41:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:41:25] Production.INFO: ==27504== Releasing lock... [2025-03-03 01:41:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:41:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:42:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:42:17] Production.INFO: count ==409 [2025-03-03 01:42:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:42:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595169', 'tblTempUsageDetail_20' ) start [2025-03-03 01:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595169', 'tblTempUsageDetail_20' ) end [2025-03-03 01:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595169', 'tblTempVendorCDR_20' ) start [2025-03-03 01:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595169', 'tblTempVendorCDR_20' ) end [2025-03-03 01:42:17] Production.INFO: ProcessCDR(1,14595169,1,1,2) [2025-03-03 01:42:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595169,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:42:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595169,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:42:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595169,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:42:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595169,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:42:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595169', 'tblTempUsageDetail_20' ) start [2025-03-03 01:42:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595169', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:42:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:42:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:42:26] Production.INFO: ==27576== Releasing lock... [2025-03-03 01:42:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:42:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:43:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:43:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:43:16] Production.INFO: count ==409 [2025-03-03 01:43:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:43:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:43:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595174', 'tblTempUsageDetail_20' ) start [2025-03-03 01:43:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595174', 'tblTempUsageDetail_20' ) end [2025-03-03 01:43:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595174', 'tblTempVendorCDR_20' ) start [2025-03-03 01:43:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595174', 'tblTempVendorCDR_20' ) end [2025-03-03 01:43:16] Production.INFO: ProcessCDR(1,14595174,1,1,2) [2025-03-03 01:43:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595174,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:43:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595174,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:43:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595174,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:43:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595174,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:43:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595174', 'tblTempUsageDetail_20' ) start [2025-03-03 01:43:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595174', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:43:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:43:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:43:24] Production.INFO: ==27649== Releasing lock... [2025-03-03 01:43:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:43:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:44:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:44:17] Production.INFO: count ==409 [2025-03-03 01:44:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:44:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595179', 'tblTempUsageDetail_20' ) start [2025-03-03 01:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595179', 'tblTempUsageDetail_20' ) end [2025-03-03 01:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595179', 'tblTempVendorCDR_20' ) start [2025-03-03 01:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595179', 'tblTempVendorCDR_20' ) end [2025-03-03 01:44:17] Production.INFO: ProcessCDR(1,14595179,1,1,2) [2025-03-03 01:44:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595179,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:44:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595179,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:44:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595179,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:44:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595179,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:44:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595179', 'tblTempUsageDetail_20' ) start [2025-03-03 01:44:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595179', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:44:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:44:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:44:25] Production.INFO: ==27735== Releasing lock... [2025-03-03 01:44:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:44:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:45:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:45:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:45:16] Production.INFO: count ==409 [2025-03-03 01:45:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:45:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595184', 'tblTempUsageDetail_20' ) start [2025-03-03 01:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595184', 'tblTempUsageDetail_20' ) end [2025-03-03 01:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595184', 'tblTempVendorCDR_20' ) start [2025-03-03 01:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595184', 'tblTempVendorCDR_20' ) end [2025-03-03 01:45:16] Production.INFO: ProcessCDR(1,14595184,1,1,2) [2025-03-03 01:45:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595184,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:45:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595184,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:45:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595184,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:45:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595184,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:45:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595184', 'tblTempUsageDetail_20' ) start [2025-03-03 01:45:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595184', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:45:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:45:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:45:25] Production.INFO: ==27822== Releasing lock... [2025-03-03 01:45:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:45:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:46:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:46:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:46:17] Production.INFO: count ==409 [2025-03-03 01:46:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:46:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595189', 'tblTempUsageDetail_20' ) start [2025-03-03 01:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595189', 'tblTempUsageDetail_20' ) end [2025-03-03 01:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595189', 'tblTempVendorCDR_20' ) start [2025-03-03 01:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595189', 'tblTempVendorCDR_20' ) end [2025-03-03 01:46:17] Production.INFO: ProcessCDR(1,14595189,1,1,2) [2025-03-03 01:46:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595189,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:46:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595189,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:46:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595189,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:46:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595189,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:46:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595189', 'tblTempUsageDetail_20' ) start [2025-03-03 01:46:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595189', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:46:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:46:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:46:26] Production.INFO: ==27903== Releasing lock... [2025-03-03 01:46:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:46:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:47:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:47:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:47:16] Production.INFO: count ==409 [2025-03-03 01:47:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:47:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595194', 'tblTempUsageDetail_20' ) start [2025-03-03 01:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595194', 'tblTempUsageDetail_20' ) end [2025-03-03 01:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595194', 'tblTempVendorCDR_20' ) start [2025-03-03 01:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595194', 'tblTempVendorCDR_20' ) end [2025-03-03 01:47:16] Production.INFO: ProcessCDR(1,14595194,1,1,2) [2025-03-03 01:47:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595194,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:47:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595194,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:47:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595194,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:47:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595194,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:47:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595194', 'tblTempUsageDetail_20' ) start [2025-03-03 01:47:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595194', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:47:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:47:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:47:25] Production.INFO: ==27985== Releasing lock... [2025-03-03 01:47:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:47:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:48:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:48:17] Production.INFO: count ==409 [2025-03-03 01:48:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:48:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595199', 'tblTempUsageDetail_20' ) start [2025-03-03 01:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595199', 'tblTempUsageDetail_20' ) end [2025-03-03 01:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595199', 'tblTempVendorCDR_20' ) start [2025-03-03 01:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595199', 'tblTempVendorCDR_20' ) end [2025-03-03 01:48:17] Production.INFO: ProcessCDR(1,14595199,1,1,2) [2025-03-03 01:48:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595199,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:48:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595199,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:48:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595199,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:48:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595199,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:48:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595199', 'tblTempUsageDetail_20' ) start [2025-03-03 01:48:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595199', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:48:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:48:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:48:26] Production.INFO: ==28062== Releasing lock... [2025-03-03 01:48:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:48:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:49:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:49:17] Production.INFO: count ==409 [2025-03-03 01:49:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:49:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595204', 'tblTempUsageDetail_20' ) start [2025-03-03 01:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595204', 'tblTempUsageDetail_20' ) end [2025-03-03 01:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595204', 'tblTempVendorCDR_20' ) start [2025-03-03 01:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595204', 'tblTempVendorCDR_20' ) end [2025-03-03 01:49:17] Production.INFO: ProcessCDR(1,14595204,1,1,2) [2025-03-03 01:49:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595204,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:49:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595204,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:49:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595204,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:49:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595204,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:49:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595204', 'tblTempUsageDetail_20' ) start [2025-03-03 01:49:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595204', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:49:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:49:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:49:25] Production.INFO: ==28140== Releasing lock... [2025-03-03 01:49:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:49:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:50:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:50:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:50:15] Production.INFO: count ==409 [2025-03-03 01:50:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:50:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:50:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595206', 'tblTempUsageDetail_20' ) start [2025-03-03 01:50:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595206', 'tblTempUsageDetail_20' ) end [2025-03-03 01:50:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595206', 'tblTempVendorCDR_20' ) start [2025-03-03 01:50:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595206', 'tblTempVendorCDR_20' ) end [2025-03-03 01:50:16] Production.INFO: ProcessCDR(1,14595206,1,1,2) [2025-03-03 01:50:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595206,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:50:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595206,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:50:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595206,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:50:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595206,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:50:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595206', 'tblTempUsageDetail_20' ) start [2025-03-03 01:50:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595206', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:50:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:50:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:50:24] Production.INFO: ==28217== Releasing lock... [2025-03-03 01:50:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:50:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:51:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:51:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:51:16] Production.INFO: count ==409 [2025-03-03 01:51:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:51:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595215', 'tblTempUsageDetail_20' ) start [2025-03-03 01:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595215', 'tblTempUsageDetail_20' ) end [2025-03-03 01:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595215', 'tblTempVendorCDR_20' ) start [2025-03-03 01:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595215', 'tblTempVendorCDR_20' ) end [2025-03-03 01:51:16] Production.INFO: ProcessCDR(1,14595215,1,1,2) [2025-03-03 01:51:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595215,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:51:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595215,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:51:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595215,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:51:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595215,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:51:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595215', 'tblTempUsageDetail_20' ) start [2025-03-03 01:51:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595215', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:51:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:51:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:51:25] Production.INFO: ==28305== Releasing lock... [2025-03-03 01:51:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:51:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:52:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:52:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:52:16] Production.INFO: count ==409 [2025-03-03 01:52:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:52:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:52:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595220', 'tblTempUsageDetail_20' ) start [2025-03-03 01:52:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595220', 'tblTempUsageDetail_20' ) end [2025-03-03 01:52:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595220', 'tblTempVendorCDR_20' ) start [2025-03-03 01:52:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595220', 'tblTempVendorCDR_20' ) end [2025-03-03 01:52:16] Production.INFO: ProcessCDR(1,14595220,1,1,2) [2025-03-03 01:52:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595220,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:52:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595220,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:52:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595220,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:52:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595220,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:52:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595220', 'tblTempUsageDetail_20' ) start [2025-03-03 01:52:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595220', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:52:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:52:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:52:25] Production.INFO: ==28378== Releasing lock... [2025-03-03 01:52:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:52:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:53:17] Production.INFO: count ==409 [2025-03-03 01:53:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:53:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595225', 'tblTempUsageDetail_20' ) start [2025-03-03 01:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595225', 'tblTempUsageDetail_20' ) end [2025-03-03 01:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595225', 'tblTempVendorCDR_20' ) start [2025-03-03 01:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595225', 'tblTempVendorCDR_20' ) end [2025-03-03 01:53:17] Production.INFO: ProcessCDR(1,14595225,1,1,2) [2025-03-03 01:53:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595225,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:53:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595225,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:53:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595225,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:53:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595225,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:53:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595225', 'tblTempUsageDetail_20' ) start [2025-03-03 01:53:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595225', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:53:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:53:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:53:26] Production.INFO: ==28499== Releasing lock... [2025-03-03 01:53:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:53:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:54:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:54:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:54:16] Production.INFO: count ==409 [2025-03-03 01:54:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:54:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595230', 'tblTempUsageDetail_20' ) start [2025-03-03 01:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595230', 'tblTempUsageDetail_20' ) end [2025-03-03 01:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595230', 'tblTempVendorCDR_20' ) start [2025-03-03 01:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595230', 'tblTempVendorCDR_20' ) end [2025-03-03 01:54:17] Production.INFO: ProcessCDR(1,14595230,1,1,2) [2025-03-03 01:54:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595230,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:54:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595230,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:54:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595230,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:54:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595230,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:54:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595230', 'tblTempUsageDetail_20' ) start [2025-03-03 01:54:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595230', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:54:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:54:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:54:25] Production.INFO: ==28584== Releasing lock... [2025-03-03 01:54:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:54:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:55:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:55:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:55:16] Production.INFO: count ==409 [2025-03-03 01:55:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:55:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595235', 'tblTempUsageDetail_20' ) start [2025-03-03 01:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595235', 'tblTempUsageDetail_20' ) end [2025-03-03 01:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595235', 'tblTempVendorCDR_20' ) start [2025-03-03 01:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595235', 'tblTempVendorCDR_20' ) end [2025-03-03 01:55:16] Production.INFO: ProcessCDR(1,14595235,1,1,2) [2025-03-03 01:55:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595235,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:55:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595235,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:55:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595235,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:55:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595235,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:55:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595235', 'tblTempUsageDetail_20' ) start [2025-03-03 01:55:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595235', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:55:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:55:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:55:25] Production.INFO: ==28658== Releasing lock... [2025-03-03 01:55:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:55:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:56:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:56:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:56:16] Production.INFO: count ==409 [2025-03-03 01:56:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:56:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595240', 'tblTempUsageDetail_20' ) start [2025-03-03 01:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595240', 'tblTempUsageDetail_20' ) end [2025-03-03 01:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595240', 'tblTempVendorCDR_20' ) start [2025-03-03 01:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595240', 'tblTempVendorCDR_20' ) end [2025-03-03 01:56:16] Production.INFO: ProcessCDR(1,14595240,1,1,2) [2025-03-03 01:56:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595240,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:56:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595240,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:56:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595240,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:56:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595240,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:56:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595240', 'tblTempUsageDetail_20' ) start [2025-03-03 01:56:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595240', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:56:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:56:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:56:25] Production.INFO: ==28742== Releasing lock... [2025-03-03 01:56:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:56:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:57:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:57:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:57:16] Production.INFO: count ==409 [2025-03-03 01:57:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:57:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595245', 'tblTempUsageDetail_20' ) start [2025-03-03 01:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595245', 'tblTempUsageDetail_20' ) end [2025-03-03 01:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595245', 'tblTempVendorCDR_20' ) start [2025-03-03 01:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595245', 'tblTempVendorCDR_20' ) end [2025-03-03 01:57:17] Production.INFO: ProcessCDR(1,14595245,1,1,2) [2025-03-03 01:57:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595245,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:57:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595245,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:57:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595245,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:57:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595245,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:57:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595245', 'tblTempUsageDetail_20' ) start [2025-03-03 01:57:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595245', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:57:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:57:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:57:25] Production.INFO: ==28831== Releasing lock... [2025-03-03 01:57:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:57:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:58:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 01:58:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:58:16] Production.INFO: count ==409 [2025-03-03 01:58:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:58:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595250', 'tblTempUsageDetail_20' ) start [2025-03-03 01:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595250', 'tblTempUsageDetail_20' ) end [2025-03-03 01:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595250', 'tblTempVendorCDR_20' ) start [2025-03-03 01:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595250', 'tblTempVendorCDR_20' ) end [2025-03-03 01:58:16] Production.INFO: ProcessCDR(1,14595250,1,1,2) [2025-03-03 01:58:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595250,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:58:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595250,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:58:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595250,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:58:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595250,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:58:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595250', 'tblTempUsageDetail_20' ) start [2025-03-03 01:58:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595250', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:58:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:58:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:58:25] Production.INFO: ==28907== Releasing lock... [2025-03-03 01:58:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:58:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 01:59:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 01:59:17] Production.INFO: count ==409 [2025-03-03 01:59:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 01:59:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 01:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595255', 'tblTempUsageDetail_20' ) start [2025-03-03 01:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595255', 'tblTempUsageDetail_20' ) end [2025-03-03 01:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595255', 'tblTempVendorCDR_20' ) start [2025-03-03 01:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595255', 'tblTempVendorCDR_20' ) end [2025-03-03 01:59:17] Production.INFO: ProcessCDR(1,14595255,1,1,2) [2025-03-03 01:59:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595255,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:59:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595255,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 01:59:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595255,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:59:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595255,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 01:59:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595255', 'tblTempUsageDetail_20' ) start [2025-03-03 01:59:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595255', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 01:59:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 01:59:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 01:59:26] Production.INFO: ==28982== Releasing lock... [2025-03-03 01:59:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 01:59:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:00:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:00:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:00:16] Production.INFO: count ==409 [2025-03-03 02:00:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:00:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595261', 'tblTempUsageDetail_20' ) start [2025-03-03 02:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595261', 'tblTempUsageDetail_20' ) end [2025-03-03 02:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595261', 'tblTempVendorCDR_20' ) start [2025-03-03 02:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595261', 'tblTempVendorCDR_20' ) end [2025-03-03 02:00:17] Production.INFO: ProcessCDR(1,14595261,1,1,2) [2025-03-03 02:00:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595261,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:00:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595261,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:00:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595261,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:00:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595261,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:00:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595261', 'tblTempUsageDetail_20' ) start [2025-03-03 02:00:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595261', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:00:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:00:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:00:26] Production.INFO: ==29059== Releasing lock... [2025-03-03 02:00:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:00:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:01:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:01:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:01:16] Production.INFO: count ==409 [2025-03-03 02:01:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:01:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595266', 'tblTempUsageDetail_20' ) start [2025-03-03 02:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595266', 'tblTempUsageDetail_20' ) end [2025-03-03 02:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595266', 'tblTempVendorCDR_20' ) start [2025-03-03 02:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595266', 'tblTempVendorCDR_20' ) end [2025-03-03 02:01:16] Production.INFO: ProcessCDR(1,14595266,1,1,2) [2025-03-03 02:01:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595266,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:01:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595266,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:01:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595266,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:01:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595266,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:01:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595266', 'tblTempUsageDetail_20' ) start [2025-03-03 02:01:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595266', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:01:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:01:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:01:25] Production.INFO: ==29248== Releasing lock... [2025-03-03 02:01:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:01:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:02:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:02:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:02:16] Production.INFO: count ==409 [2025-03-03 02:02:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:02:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:02:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595271', 'tblTempUsageDetail_20' ) start [2025-03-03 02:02:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595271', 'tblTempUsageDetail_20' ) end [2025-03-03 02:02:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595271', 'tblTempVendorCDR_20' ) start [2025-03-03 02:02:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595271', 'tblTempVendorCDR_20' ) end [2025-03-03 02:02:16] Production.INFO: ProcessCDR(1,14595271,1,1,2) [2025-03-03 02:02:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595271,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:02:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595271,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:02:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595271,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:02:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595271,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:02:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595271', 'tblTempUsageDetail_20' ) start [2025-03-03 02:02:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595271', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:02:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:02:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:02:25] Production.INFO: ==29334== Releasing lock... [2025-03-03 02:02:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:02:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:03:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:03:17] Production.INFO: count ==409 [2025-03-03 02:03:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:03:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595276', 'tblTempUsageDetail_20' ) start [2025-03-03 02:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595276', 'tblTempUsageDetail_20' ) end [2025-03-03 02:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595276', 'tblTempVendorCDR_20' ) start [2025-03-03 02:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595276', 'tblTempVendorCDR_20' ) end [2025-03-03 02:03:17] Production.INFO: ProcessCDR(1,14595276,1,1,2) [2025-03-03 02:03:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595276,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:03:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595276,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:03:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595276,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:03:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595276,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:03:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595276', 'tblTempUsageDetail_20' ) start [2025-03-03 02:03:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595276', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:03:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:03:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:03:26] Production.INFO: ==29417== Releasing lock... [2025-03-03 02:03:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:03:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:04:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:04:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:04:16] Production.INFO: count ==409 [2025-03-03 02:04:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:04:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:04:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595281', 'tblTempUsageDetail_20' ) start [2025-03-03 02:04:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595281', 'tblTempUsageDetail_20' ) end [2025-03-03 02:04:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595281', 'tblTempVendorCDR_20' ) start [2025-03-03 02:04:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595281', 'tblTempVendorCDR_20' ) end [2025-03-03 02:04:16] Production.INFO: ProcessCDR(1,14595281,1,1,2) [2025-03-03 02:04:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595281,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:04:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595281,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:04:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595281,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:04:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595281,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:04:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595281', 'tblTempUsageDetail_20' ) start [2025-03-03 02:04:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595281', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:04:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:04:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:04:25] Production.INFO: ==29506== Releasing lock... [2025-03-03 02:04:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:04:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:05:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:05:17] Production.INFO: count ==409 [2025-03-03 02:05:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:05:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595286', 'tblTempUsageDetail_20' ) start [2025-03-03 02:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595286', 'tblTempUsageDetail_20' ) end [2025-03-03 02:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595286', 'tblTempVendorCDR_20' ) start [2025-03-03 02:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595286', 'tblTempVendorCDR_20' ) end [2025-03-03 02:05:17] Production.INFO: ProcessCDR(1,14595286,1,1,2) [2025-03-03 02:05:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595286,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:05:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595286,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:05:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595286,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:05:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595286,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:05:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595286', 'tblTempUsageDetail_20' ) start [2025-03-03 02:05:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595286', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:05:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:05:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:05:26] Production.INFO: ==29599== Releasing lock... [2025-03-03 02:05:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:05:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:06:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:06:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:06:16] Production.INFO: count ==409 [2025-03-03 02:06:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:06:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595291', 'tblTempUsageDetail_20' ) start [2025-03-03 02:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595291', 'tblTempUsageDetail_20' ) end [2025-03-03 02:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595291', 'tblTempVendorCDR_20' ) start [2025-03-03 02:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595291', 'tblTempVendorCDR_20' ) end [2025-03-03 02:06:16] Production.INFO: ProcessCDR(1,14595291,1,1,2) [2025-03-03 02:06:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595291,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:06:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595291,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:06:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595291,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:06:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595291,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:06:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595291', 'tblTempUsageDetail_20' ) start [2025-03-03 02:06:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595291', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:06:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:06:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:06:25] Production.INFO: ==29683== Releasing lock... [2025-03-03 02:06:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:06:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:07:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:07:17] Production.INFO: count ==409 [2025-03-03 02:07:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:07:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595296', 'tblTempUsageDetail_20' ) start [2025-03-03 02:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595296', 'tblTempUsageDetail_20' ) end [2025-03-03 02:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595296', 'tblTempVendorCDR_20' ) start [2025-03-03 02:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595296', 'tblTempVendorCDR_20' ) end [2025-03-03 02:07:17] Production.INFO: ProcessCDR(1,14595296,1,1,2) [2025-03-03 02:07:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595296,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:07:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595296,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:07:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595296,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:07:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595296,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:07:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595296', 'tblTempUsageDetail_20' ) start [2025-03-03 02:07:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595296', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:07:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:07:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:07:26] Production.INFO: ==29765== Releasing lock... [2025-03-03 02:07:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:07:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:08:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:08:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:08:16] Production.INFO: count ==409 [2025-03-03 02:08:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:08:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595301', 'tblTempUsageDetail_20' ) start [2025-03-03 02:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595301', 'tblTempUsageDetail_20' ) end [2025-03-03 02:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595301', 'tblTempVendorCDR_20' ) start [2025-03-03 02:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595301', 'tblTempVendorCDR_20' ) end [2025-03-03 02:08:16] Production.INFO: ProcessCDR(1,14595301,1,1,2) [2025-03-03 02:08:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595301,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:08:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595301,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:08:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595301,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:08:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595301,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:08:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595301', 'tblTempUsageDetail_20' ) start [2025-03-03 02:08:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595301', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:08:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:08:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:08:24] Production.INFO: ==29838== Releasing lock... [2025-03-03 02:08:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:08:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:09:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:09:17] Production.INFO: count ==409 [2025-03-03 02:09:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:09:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595306', 'tblTempUsageDetail_20' ) start [2025-03-03 02:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595306', 'tblTempUsageDetail_20' ) end [2025-03-03 02:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595306', 'tblTempVendorCDR_20' ) start [2025-03-03 02:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595306', 'tblTempVendorCDR_20' ) end [2025-03-03 02:09:17] Production.INFO: ProcessCDR(1,14595306,1,1,2) [2025-03-03 02:09:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595306,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:09:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595306,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:09:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595306,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:09:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595306,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:09:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595306', 'tblTempUsageDetail_20' ) start [2025-03-03 02:09:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595306', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:09:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:09:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:09:25] Production.INFO: ==29963== Releasing lock... [2025-03-03 02:09:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:09:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:10:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:10:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:10:16] Production.INFO: count ==409 [2025-03-03 02:10:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:10:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595311', 'tblTempUsageDetail_20' ) start [2025-03-03 02:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595311', 'tblTempUsageDetail_20' ) end [2025-03-03 02:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595311', 'tblTempVendorCDR_20' ) start [2025-03-03 02:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595311', 'tblTempVendorCDR_20' ) end [2025-03-03 02:10:17] Production.INFO: ProcessCDR(1,14595311,1,1,2) [2025-03-03 02:10:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595311,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:10:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595311,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:10:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595311,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:10:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595311,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:10:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595311', 'tblTempUsageDetail_20' ) start [2025-03-03 02:10:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595311', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:10:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:10:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:10:24] Production.INFO: ==30037== Releasing lock... [2025-03-03 02:10:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:10:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:11:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:11:17] Production.INFO: count ==409 [2025-03-03 02:11:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:11:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595317', 'tblTempUsageDetail_20' ) start [2025-03-03 02:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595317', 'tblTempUsageDetail_20' ) end [2025-03-03 02:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595317', 'tblTempVendorCDR_20' ) start [2025-03-03 02:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595317', 'tblTempVendorCDR_20' ) end [2025-03-03 02:11:17] Production.INFO: ProcessCDR(1,14595317,1,1,2) [2025-03-03 02:11:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595317,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:11:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595317,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:11:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595317,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:11:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595317,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:11:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595317', 'tblTempUsageDetail_20' ) start [2025-03-03 02:11:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595317', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:11:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:11:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:11:24] Production.INFO: ==30111== Releasing lock... [2025-03-03 02:11:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:11:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:12:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:12:16] Production.INFO: count ==409 [2025-03-03 02:12:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:12:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595322', 'tblTempUsageDetail_20' ) start [2025-03-03 02:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595322', 'tblTempUsageDetail_20' ) end [2025-03-03 02:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595322', 'tblTempVendorCDR_20' ) start [2025-03-03 02:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595322', 'tblTempVendorCDR_20' ) end [2025-03-03 02:12:17] Production.INFO: ProcessCDR(1,14595322,1,1,2) [2025-03-03 02:12:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595322,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:12:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595322,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:12:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595322,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:12:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595322,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:12:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595322', 'tblTempUsageDetail_20' ) start [2025-03-03 02:12:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595322', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:12:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:12:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:12:24] Production.INFO: ==30187== Releasing lock... [2025-03-03 02:12:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:12:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:13:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:13:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:13:16] Production.INFO: count ==409 [2025-03-03 02:13:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:13:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:13:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595327', 'tblTempUsageDetail_20' ) start [2025-03-03 02:13:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595327', 'tblTempUsageDetail_20' ) end [2025-03-03 02:13:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595327', 'tblTempVendorCDR_20' ) start [2025-03-03 02:13:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595327', 'tblTempVendorCDR_20' ) end [2025-03-03 02:13:16] Production.INFO: ProcessCDR(1,14595327,1,1,2) [2025-03-03 02:13:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595327,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:13:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595327,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:13:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595327,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:13:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595327,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:13:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595327', 'tblTempUsageDetail_20' ) start [2025-03-03 02:13:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595327', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:13:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:13:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:13:24] Production.INFO: ==30271== Releasing lock... [2025-03-03 02:13:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:13:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:14:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:14:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:14:16] Production.INFO: count ==409 [2025-03-03 02:14:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:14:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:14:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595332', 'tblTempUsageDetail_20' ) start [2025-03-03 02:14:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595332', 'tblTempUsageDetail_20' ) end [2025-03-03 02:14:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595332', 'tblTempVendorCDR_20' ) start [2025-03-03 02:14:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595332', 'tblTempVendorCDR_20' ) end [2025-03-03 02:14:16] Production.INFO: ProcessCDR(1,14595332,1,1,2) [2025-03-03 02:14:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595332,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:14:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595332,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:14:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595332,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:14:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595332,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:14:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595332', 'tblTempUsageDetail_20' ) start [2025-03-03 02:14:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595332', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:14:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:14:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:14:24] Production.INFO: ==30359== Releasing lock... [2025-03-03 02:14:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:14:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:15:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:15:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:15:16] Production.INFO: count ==409 [2025-03-03 02:15:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:15:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595337', 'tblTempUsageDetail_20' ) start [2025-03-03 02:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595337', 'tblTempUsageDetail_20' ) end [2025-03-03 02:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595337', 'tblTempVendorCDR_20' ) start [2025-03-03 02:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595337', 'tblTempVendorCDR_20' ) end [2025-03-03 02:15:16] Production.INFO: ProcessCDR(1,14595337,1,1,2) [2025-03-03 02:15:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595337,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:15:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595337,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:15:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595337,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:15:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595337,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:15:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595337', 'tblTempUsageDetail_20' ) start [2025-03-03 02:15:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595337', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:15:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:15:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:15:24] Production.INFO: ==30434== Releasing lock... [2025-03-03 02:15:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:15:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:16:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:16:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:16:16] Production.INFO: count ==409 [2025-03-03 02:16:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:16:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595342', 'tblTempUsageDetail_20' ) start [2025-03-03 02:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595342', 'tblTempUsageDetail_20' ) end [2025-03-03 02:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595342', 'tblTempVendorCDR_20' ) start [2025-03-03 02:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595342', 'tblTempVendorCDR_20' ) end [2025-03-03 02:16:16] Production.INFO: ProcessCDR(1,14595342,1,1,2) [2025-03-03 02:16:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595342,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:16:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595342,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:16:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595342,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:16:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595342,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595342', 'tblTempUsageDetail_20' ) start [2025-03-03 02:16:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595342', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:16:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:16:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:16:24] Production.INFO: ==30509== Releasing lock... [2025-03-03 02:16:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:16:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:17:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:17:16] Production.INFO: count ==409 [2025-03-03 02:17:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:17:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595347', 'tblTempUsageDetail_20' ) start [2025-03-03 02:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595347', 'tblTempUsageDetail_20' ) end [2025-03-03 02:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595347', 'tblTempVendorCDR_20' ) start [2025-03-03 02:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595347', 'tblTempVendorCDR_20' ) end [2025-03-03 02:17:16] Production.INFO: ProcessCDR(1,14595347,1,1,2) [2025-03-03 02:17:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595347,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:17:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595347,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:17:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595347,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:17:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595347,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595347', 'tblTempUsageDetail_20' ) start [2025-03-03 02:17:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595347', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:17:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:17:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:17:24] Production.INFO: ==30585== Releasing lock... [2025-03-03 02:17:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:17:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:18:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:18:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:18:16] Production.INFO: count ==409 [2025-03-03 02:18:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:18:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595352', 'tblTempUsageDetail_20' ) start [2025-03-03 02:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595352', 'tblTempUsageDetail_20' ) end [2025-03-03 02:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595352', 'tblTempVendorCDR_20' ) start [2025-03-03 02:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595352', 'tblTempVendorCDR_20' ) end [2025-03-03 02:18:17] Production.INFO: ProcessCDR(1,14595352,1,1,2) [2025-03-03 02:18:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595352,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:18:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595352,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:18:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595352,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:18:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595352,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:18:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595352', 'tblTempUsageDetail_20' ) start [2025-03-03 02:18:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595352', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:18:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:18:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:18:24] Production.INFO: ==30674== Releasing lock... [2025-03-03 02:18:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:18:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:19:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:19:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:19:16] Production.INFO: count ==409 [2025-03-03 02:19:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:19:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595357', 'tblTempUsageDetail_20' ) start [2025-03-03 02:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595357', 'tblTempUsageDetail_20' ) end [2025-03-03 02:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595357', 'tblTempVendorCDR_20' ) start [2025-03-03 02:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595357', 'tblTempVendorCDR_20' ) end [2025-03-03 02:19:16] Production.INFO: ProcessCDR(1,14595357,1,1,2) [2025-03-03 02:19:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595357,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:19:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595357,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:19:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595357,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:19:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595357,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:19:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595357', 'tblTempUsageDetail_20' ) start [2025-03-03 02:19:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595357', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:19:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:19:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:19:24] Production.INFO: ==30746== Releasing lock... [2025-03-03 02:19:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:19:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:20:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:20:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:20:17] Production.INFO: count ==409 [2025-03-03 02:20:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:20:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595363', 'tblTempUsageDetail_20' ) start [2025-03-03 02:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595363', 'tblTempUsageDetail_20' ) end [2025-03-03 02:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595363', 'tblTempVendorCDR_20' ) start [2025-03-03 02:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595363', 'tblTempVendorCDR_20' ) end [2025-03-03 02:20:17] Production.INFO: ProcessCDR(1,14595363,1,1,2) [2025-03-03 02:20:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595363,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:20:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595363,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:20:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595363,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:20:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595363,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:20:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595363', 'tblTempUsageDetail_20' ) start [2025-03-03 02:20:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595363', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:20:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:20:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:20:25] Production.INFO: ==30833== Releasing lock... [2025-03-03 02:20:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:20:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:21:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:21:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:21:16] Production.INFO: count ==409 [2025-03-03 02:21:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:21:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595368', 'tblTempUsageDetail_20' ) start [2025-03-03 02:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595368', 'tblTempUsageDetail_20' ) end [2025-03-03 02:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595368', 'tblTempVendorCDR_20' ) start [2025-03-03 02:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595368', 'tblTempVendorCDR_20' ) end [2025-03-03 02:21:16] Production.INFO: ProcessCDR(1,14595368,1,1,2) [2025-03-03 02:21:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595368,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:21:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595368,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:21:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595368,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:21:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595368,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:21:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595368', 'tblTempUsageDetail_20' ) start [2025-03-03 02:21:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595368', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:21:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:21:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:21:24] Production.INFO: ==30925== Releasing lock... [2025-03-03 02:21:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:21:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:22:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:22:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:22:16] Production.INFO: count ==409 [2025-03-03 02:22:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:22:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:22:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595373', 'tblTempUsageDetail_20' ) start [2025-03-03 02:22:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595373', 'tblTempUsageDetail_20' ) end [2025-03-03 02:22:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595373', 'tblTempVendorCDR_20' ) start [2025-03-03 02:22:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595373', 'tblTempVendorCDR_20' ) end [2025-03-03 02:22:16] Production.INFO: ProcessCDR(1,14595373,1,1,2) [2025-03-03 02:22:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595373,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:22:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595373,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:22:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595373,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:22:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595373,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595373', 'tblTempUsageDetail_20' ) start [2025-03-03 02:22:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595373', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:22:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:22:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:22:24] Production.INFO: ==31013== Releasing lock... [2025-03-03 02:22:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:22:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:23:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:23:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:23:15] Production.INFO: count ==409 [2025-03-03 02:23:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:23:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595378', 'tblTempUsageDetail_20' ) start [2025-03-03 02:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595378', 'tblTempUsageDetail_20' ) end [2025-03-03 02:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595378', 'tblTempVendorCDR_20' ) start [2025-03-03 02:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595378', 'tblTempVendorCDR_20' ) end [2025-03-03 02:23:16] Production.INFO: ProcessCDR(1,14595378,1,1,2) [2025-03-03 02:23:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595378,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:23:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595378,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:23:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595378,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:23:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595378,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:23:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595378', 'tblTempUsageDetail_20' ) start [2025-03-03 02:23:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595378', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:23:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:23:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:23:23] Production.INFO: ==31096== Releasing lock... [2025-03-03 02:23:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:23:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:24:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:24:17] Production.INFO: count ==409 [2025-03-03 02:24:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:24:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595383', 'tblTempUsageDetail_20' ) start [2025-03-03 02:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595383', 'tblTempUsageDetail_20' ) end [2025-03-03 02:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595383', 'tblTempVendorCDR_20' ) start [2025-03-03 02:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595383', 'tblTempVendorCDR_20' ) end [2025-03-03 02:24:17] Production.INFO: ProcessCDR(1,14595383,1,1,2) [2025-03-03 02:24:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595383,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:24:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595383,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:24:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595383,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:24:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595383,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:24:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595383', 'tblTempUsageDetail_20' ) start [2025-03-03 02:24:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595383', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:24:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:24:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:24:24] Production.INFO: ==31227== Releasing lock... [2025-03-03 02:24:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:24:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:25:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:25:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:25:16] Production.INFO: count ==409 [2025-03-03 02:25:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:25:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595388', 'tblTempUsageDetail_20' ) start [2025-03-03 02:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595388', 'tblTempUsageDetail_20' ) end [2025-03-03 02:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595388', 'tblTempVendorCDR_20' ) start [2025-03-03 02:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595388', 'tblTempVendorCDR_20' ) end [2025-03-03 02:25:17] Production.INFO: ProcessCDR(1,14595388,1,1,2) [2025-03-03 02:25:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595388,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:25:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595388,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:25:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595388,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:25:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595388,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:25:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595388', 'tblTempUsageDetail_20' ) start [2025-03-03 02:25:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595388', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:25:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:25:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:25:24] Production.INFO: ==31312== Releasing lock... [2025-03-03 02:25:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:25:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:26:17] Production.INFO: count ==409 [2025-03-03 02:26:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:26:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595393', 'tblTempUsageDetail_20' ) start [2025-03-03 02:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595393', 'tblTempUsageDetail_20' ) end [2025-03-03 02:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595393', 'tblTempVendorCDR_20' ) start [2025-03-03 02:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595393', 'tblTempVendorCDR_20' ) end [2025-03-03 02:26:17] Production.INFO: ProcessCDR(1,14595393,1,1,2) [2025-03-03 02:26:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595393,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:26:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595393,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:26:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595393,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:26:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595393,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:26:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595393', 'tblTempUsageDetail_20' ) start [2025-03-03 02:26:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595393', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:26:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:26:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:26:25] Production.INFO: ==31395== Releasing lock... [2025-03-03 02:26:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:26:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:27:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:27:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:27:16] Production.INFO: count ==409 [2025-03-03 02:27:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:27:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595398', 'tblTempUsageDetail_20' ) start [2025-03-03 02:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595398', 'tblTempUsageDetail_20' ) end [2025-03-03 02:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595398', 'tblTempVendorCDR_20' ) start [2025-03-03 02:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595398', 'tblTempVendorCDR_20' ) end [2025-03-03 02:27:16] Production.INFO: ProcessCDR(1,14595398,1,1,2) [2025-03-03 02:27:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595398,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:27:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595398,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:27:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595398,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:27:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595398,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:27:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595398', 'tblTempUsageDetail_20' ) start [2025-03-03 02:27:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595398', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:27:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:27:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:27:24] Production.INFO: ==31473== Releasing lock... [2025-03-03 02:27:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:27:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:28:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:28:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:28:16] Production.INFO: count ==409 [2025-03-03 02:28:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:28:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:28:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595403', 'tblTempUsageDetail_20' ) start [2025-03-03 02:28:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595403', 'tblTempUsageDetail_20' ) end [2025-03-03 02:28:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595403', 'tblTempVendorCDR_20' ) start [2025-03-03 02:28:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595403', 'tblTempVendorCDR_20' ) end [2025-03-03 02:28:16] Production.INFO: ProcessCDR(1,14595403,1,1,2) [2025-03-03 02:28:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595403,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:28:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595403,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:28:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595403,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:28:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595403,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:28:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595403', 'tblTempUsageDetail_20' ) start [2025-03-03 02:28:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595403', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:28:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:28:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:28:24] Production.INFO: ==31565== Releasing lock... [2025-03-03 02:28:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:28:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:29:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:29:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:29:16] Production.INFO: count ==409 [2025-03-03 02:29:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:29:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595408', 'tblTempUsageDetail_20' ) start [2025-03-03 02:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595408', 'tblTempUsageDetail_20' ) end [2025-03-03 02:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595408', 'tblTempVendorCDR_20' ) start [2025-03-03 02:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595408', 'tblTempVendorCDR_20' ) end [2025-03-03 02:29:16] Production.INFO: ProcessCDR(1,14595408,1,1,2) [2025-03-03 02:29:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595408,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:29:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595408,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:29:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595408,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:29:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595408,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:29:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595408', 'tblTempUsageDetail_20' ) start [2025-03-03 02:29:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595408', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:29:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:29:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:29:24] Production.INFO: ==31663== Releasing lock... [2025-03-03 02:29:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:29:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:30:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:30:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:30:17] Production.INFO: count ==409 [2025-03-03 02:30:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:30:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595414', 'tblTempUsageDetail_20' ) start [2025-03-03 02:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595414', 'tblTempUsageDetail_20' ) end [2025-03-03 02:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595414', 'tblTempVendorCDR_20' ) start [2025-03-03 02:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595414', 'tblTempVendorCDR_20' ) end [2025-03-03 02:30:17] Production.INFO: ProcessCDR(1,14595414,1,1,2) [2025-03-03 02:30:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595414,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:30:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595414,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:30:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595414,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:30:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595414,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:30:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595414', 'tblTempUsageDetail_20' ) start [2025-03-03 02:30:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595414', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:30:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:30:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:30:24] Production.INFO: ==31749== Releasing lock... [2025-03-03 02:30:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:30:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:31:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:31:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:31:16] Production.INFO: count ==409 [2025-03-03 02:31:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:31:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595419', 'tblTempUsageDetail_20' ) start [2025-03-03 02:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595419', 'tblTempUsageDetail_20' ) end [2025-03-03 02:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595419', 'tblTempVendorCDR_20' ) start [2025-03-03 02:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595419', 'tblTempVendorCDR_20' ) end [2025-03-03 02:31:16] Production.INFO: ProcessCDR(1,14595419,1,1,2) [2025-03-03 02:31:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595419,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:31:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595419,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:31:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595419,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:31:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595419,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:31:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595419', 'tblTempUsageDetail_20' ) start [2025-03-03 02:31:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595419', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:31:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:31:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:31:24] Production.INFO: ==31833== Releasing lock... [2025-03-03 02:31:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:31:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:32:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:32:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:32:16] Production.INFO: count ==409 [2025-03-03 02:32:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:32:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595424', 'tblTempUsageDetail_20' ) start [2025-03-03 02:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595424', 'tblTempUsageDetail_20' ) end [2025-03-03 02:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595424', 'tblTempVendorCDR_20' ) start [2025-03-03 02:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595424', 'tblTempVendorCDR_20' ) end [2025-03-03 02:32:16] Production.INFO: ProcessCDR(1,14595424,1,1,2) [2025-03-03 02:32:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595424,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:32:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595424,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:32:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595424,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:32:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595424,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:32:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595424', 'tblTempUsageDetail_20' ) start [2025-03-03 02:32:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595424', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:32:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:32:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:32:24] Production.INFO: ==31917== Releasing lock... [2025-03-03 02:32:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:32:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:33:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:33:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:33:16] Production.INFO: count ==409 [2025-03-03 02:33:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:33:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595429', 'tblTempUsageDetail_20' ) start [2025-03-03 02:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595429', 'tblTempUsageDetail_20' ) end [2025-03-03 02:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595429', 'tblTempVendorCDR_20' ) start [2025-03-03 02:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595429', 'tblTempVendorCDR_20' ) end [2025-03-03 02:33:16] Production.INFO: ProcessCDR(1,14595429,1,1,2) [2025-03-03 02:33:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595429,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:33:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595429,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:33:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595429,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:33:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595429,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:33:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595429', 'tblTempUsageDetail_20' ) start [2025-03-03 02:33:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595429', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:33:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:33:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:33:24] Production.INFO: ==31991== Releasing lock... [2025-03-03 02:33:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:33:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:34:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:34:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:34:16] Production.INFO: count ==409 [2025-03-03 02:34:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:34:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595434', 'tblTempUsageDetail_20' ) start [2025-03-03 02:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595434', 'tblTempUsageDetail_20' ) end [2025-03-03 02:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595434', 'tblTempVendorCDR_20' ) start [2025-03-03 02:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595434', 'tblTempVendorCDR_20' ) end [2025-03-03 02:34:16] Production.INFO: ProcessCDR(1,14595434,1,1,2) [2025-03-03 02:34:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595434,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:34:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595434,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:34:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595434,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:34:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595434,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:34:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595434', 'tblTempUsageDetail_20' ) start [2025-03-03 02:34:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595434', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:34:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:34:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:34:24] Production.INFO: ==32079== Releasing lock... [2025-03-03 02:34:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:34:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:35:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:35:17] Production.INFO: count ==409 [2025-03-03 02:35:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:35:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595439', 'tblTempUsageDetail_20' ) start [2025-03-03 02:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595439', 'tblTempUsageDetail_20' ) end [2025-03-03 02:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595439', 'tblTempVendorCDR_20' ) start [2025-03-03 02:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595439', 'tblTempVendorCDR_20' ) end [2025-03-03 02:35:17] Production.INFO: ProcessCDR(1,14595439,1,1,2) [2025-03-03 02:35:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595439,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:35:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595439,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:35:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595439,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:35:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595439,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:35:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595439', 'tblTempUsageDetail_20' ) start [2025-03-03 02:35:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595439', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:35:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:35:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:35:24] Production.INFO: ==32166== Releasing lock... [2025-03-03 02:35:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:35:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:36:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:36:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:36:16] Production.INFO: count ==409 [2025-03-03 02:36:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:36:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595444', 'tblTempUsageDetail_20' ) start [2025-03-03 02:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595444', 'tblTempUsageDetail_20' ) end [2025-03-03 02:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595444', 'tblTempVendorCDR_20' ) start [2025-03-03 02:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595444', 'tblTempVendorCDR_20' ) end [2025-03-03 02:36:16] Production.INFO: ProcessCDR(1,14595444,1,1,2) [2025-03-03 02:36:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595444,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:36:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595444,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:36:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595444,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:36:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595444,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:36:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595444', 'tblTempUsageDetail_20' ) start [2025-03-03 02:36:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595444', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:36:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:36:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:36:24] Production.INFO: ==32249== Releasing lock... [2025-03-03 02:36:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:36:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:37:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:37:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:37:16] Production.INFO: count ==409 [2025-03-03 02:37:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:37:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:37:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595449', 'tblTempUsageDetail_20' ) start [2025-03-03 02:37:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595449', 'tblTempUsageDetail_20' ) end [2025-03-03 02:37:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595449', 'tblTempVendorCDR_20' ) start [2025-03-03 02:37:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595449', 'tblTempVendorCDR_20' ) end [2025-03-03 02:37:16] Production.INFO: ProcessCDR(1,14595449,1,1,2) [2025-03-03 02:37:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595449,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:37:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595449,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:37:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595449,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:37:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595449,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595449', 'tblTempUsageDetail_20' ) start [2025-03-03 02:37:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595449', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:37:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:37:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:37:24] Production.INFO: ==32333== Releasing lock... [2025-03-03 02:37:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:37:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:38:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:38:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:38:16] Production.INFO: count ==409 [2025-03-03 02:38:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:38:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595454', 'tblTempUsageDetail_20' ) start [2025-03-03 02:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595454', 'tblTempUsageDetail_20' ) end [2025-03-03 02:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595454', 'tblTempVendorCDR_20' ) start [2025-03-03 02:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595454', 'tblTempVendorCDR_20' ) end [2025-03-03 02:38:17] Production.INFO: ProcessCDR(1,14595454,1,1,2) [2025-03-03 02:38:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595454,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:38:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595454,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:38:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595454,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:38:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595454,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:38:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595454', 'tblTempUsageDetail_20' ) start [2025-03-03 02:38:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595454', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:38:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:38:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:38:25] Production.INFO: ==32425== Releasing lock... [2025-03-03 02:38:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:38:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:39:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:39:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:39:16] Production.INFO: count ==409 [2025-03-03 02:39:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:39:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595459', 'tblTempUsageDetail_20' ) start [2025-03-03 02:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595459', 'tblTempUsageDetail_20' ) end [2025-03-03 02:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595459', 'tblTempVendorCDR_20' ) start [2025-03-03 02:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595459', 'tblTempVendorCDR_20' ) end [2025-03-03 02:39:16] Production.INFO: ProcessCDR(1,14595459,1,1,2) [2025-03-03 02:39:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595459,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:39:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595459,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:39:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595459,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:39:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595459,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:39:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595459', 'tblTempUsageDetail_20' ) start [2025-03-03 02:39:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595459', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:39:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:39:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:39:24] Production.INFO: ==32505== Releasing lock... [2025-03-03 02:39:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:39:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:40:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:40:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:40:17] Production.INFO: count ==409 [2025-03-03 02:40:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:40:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595465', 'tblTempUsageDetail_20' ) start [2025-03-03 02:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595465', 'tblTempUsageDetail_20' ) end [2025-03-03 02:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595465', 'tblTempVendorCDR_20' ) start [2025-03-03 02:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595465', 'tblTempVendorCDR_20' ) end [2025-03-03 02:40:17] Production.INFO: ProcessCDR(1,14595465,1,1,2) [2025-03-03 02:40:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595465,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:40:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595465,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:40:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595465,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:40:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595465,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:40:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595465', 'tblTempUsageDetail_20' ) start [2025-03-03 02:40:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595465', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:40:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:40:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:40:25] Production.INFO: ==32639== Releasing lock... [2025-03-03 02:40:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:40:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:41:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:41:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:41:15] Production.INFO: count ==409 [2025-03-03 02:41:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:41:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595470', 'tblTempUsageDetail_20' ) start [2025-03-03 02:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595470', 'tblTempUsageDetail_20' ) end [2025-03-03 02:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595470', 'tblTempVendorCDR_20' ) start [2025-03-03 02:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595470', 'tblTempVendorCDR_20' ) end [2025-03-03 02:41:16] Production.INFO: ProcessCDR(1,14595470,1,1,2) [2025-03-03 02:41:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595470,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:41:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595470,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:41:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595470,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:41:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595470,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:41:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595470', 'tblTempUsageDetail_20' ) start [2025-03-03 02:41:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595470', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:41:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:41:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:41:23] Production.INFO: ==32725== Releasing lock... [2025-03-03 02:41:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:41:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:42:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:42:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:42:16] Production.INFO: count ==409 [2025-03-03 02:42:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:42:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595475', 'tblTempUsageDetail_20' ) start [2025-03-03 02:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595475', 'tblTempUsageDetail_20' ) end [2025-03-03 02:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595475', 'tblTempVendorCDR_20' ) start [2025-03-03 02:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595475', 'tblTempVendorCDR_20' ) end [2025-03-03 02:42:16] Production.INFO: ProcessCDR(1,14595475,1,1,2) [2025-03-03 02:42:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595475,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:42:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595475,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:42:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595475,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:42:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595475,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:42:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595475', 'tblTempUsageDetail_20' ) start [2025-03-03 02:42:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595475', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:42:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:42:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:42:24] Production.INFO: ==354== Releasing lock... [2025-03-03 02:42:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:42:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:43:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:43:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:43:16] Production.INFO: count ==409 [2025-03-03 02:43:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:43:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:43:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595480', 'tblTempUsageDetail_20' ) start [2025-03-03 02:43:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595480', 'tblTempUsageDetail_20' ) end [2025-03-03 02:43:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595480', 'tblTempVendorCDR_20' ) start [2025-03-03 02:43:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595480', 'tblTempVendorCDR_20' ) end [2025-03-03 02:43:16] Production.INFO: ProcessCDR(1,14595480,1,1,2) [2025-03-03 02:43:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595480,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:43:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595480,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:43:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595480,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:43:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595480,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:43:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595480', 'tblTempUsageDetail_20' ) start [2025-03-03 02:43:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595480', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:43:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:43:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:43:24] Production.INFO: ==424== Releasing lock... [2025-03-03 02:43:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:43:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:44:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:44:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:44:16] Production.INFO: count ==409 [2025-03-03 02:44:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:44:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595485', 'tblTempUsageDetail_20' ) start [2025-03-03 02:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595485', 'tblTempUsageDetail_20' ) end [2025-03-03 02:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595485', 'tblTempVendorCDR_20' ) start [2025-03-03 02:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595485', 'tblTempVendorCDR_20' ) end [2025-03-03 02:44:16] Production.INFO: ProcessCDR(1,14595485,1,1,2) [2025-03-03 02:44:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595485,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:44:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595485,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:44:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595485,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:44:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595485,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595485', 'tblTempUsageDetail_20' ) start [2025-03-03 02:44:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595485', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:44:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:44:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:44:24] Production.INFO: ==515== Releasing lock... [2025-03-03 02:44:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:44:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:45:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:45:16] Production.INFO: count ==409 [2025-03-03 02:45:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:45:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595490', 'tblTempUsageDetail_20' ) start [2025-03-03 02:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595490', 'tblTempUsageDetail_20' ) end [2025-03-03 02:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595490', 'tblTempVendorCDR_20' ) start [2025-03-03 02:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595490', 'tblTempVendorCDR_20' ) end [2025-03-03 02:45:17] Production.INFO: ProcessCDR(1,14595490,1,1,2) [2025-03-03 02:45:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595490,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:45:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595490,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:45:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595490,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:45:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595490,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:45:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595490', 'tblTempUsageDetail_20' ) start [2025-03-03 02:45:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595490', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:45:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:45:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:45:25] Production.INFO: ==592== Releasing lock... [2025-03-03 02:45:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:45:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:46:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:46:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:46:16] Production.INFO: count ==409 [2025-03-03 02:46:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:46:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:46:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595495', 'tblTempUsageDetail_20' ) start [2025-03-03 02:46:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595495', 'tblTempUsageDetail_20' ) end [2025-03-03 02:46:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595495', 'tblTempVendorCDR_20' ) start [2025-03-03 02:46:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595495', 'tblTempVendorCDR_20' ) end [2025-03-03 02:46:16] Production.INFO: ProcessCDR(1,14595495,1,1,2) [2025-03-03 02:46:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595495,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:46:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595495,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:46:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595495,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:46:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595495,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595495', 'tblTempUsageDetail_20' ) start [2025-03-03 02:46:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595495', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:46:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:46:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:46:24] Production.INFO: ==691== Releasing lock... [2025-03-03 02:46:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:46:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:47:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:47:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:47:16] Production.INFO: count ==409 [2025-03-03 02:47:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:47:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595500', 'tblTempUsageDetail_20' ) start [2025-03-03 02:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595500', 'tblTempUsageDetail_20' ) end [2025-03-03 02:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595500', 'tblTempVendorCDR_20' ) start [2025-03-03 02:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595500', 'tblTempVendorCDR_20' ) end [2025-03-03 02:47:17] Production.INFO: ProcessCDR(1,14595500,1,1,2) [2025-03-03 02:47:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595500,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:47:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595500,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:47:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595500,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:47:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595500,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:47:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595500', 'tblTempUsageDetail_20' ) start [2025-03-03 02:47:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595500', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:47:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:47:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:47:24] Production.INFO: ==776== Releasing lock... [2025-03-03 02:47:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:47:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:48:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:48:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:48:16] Production.INFO: count ==409 [2025-03-03 02:48:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:48:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595505', 'tblTempUsageDetail_20' ) start [2025-03-03 02:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595505', 'tblTempUsageDetail_20' ) end [2025-03-03 02:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595505', 'tblTempVendorCDR_20' ) start [2025-03-03 02:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595505', 'tblTempVendorCDR_20' ) end [2025-03-03 02:48:16] Production.INFO: ProcessCDR(1,14595505,1,1,2) [2025-03-03 02:48:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595505,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:48:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595505,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:48:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595505,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:48:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595505,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:48:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595505', 'tblTempUsageDetail_20' ) start [2025-03-03 02:48:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595505', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:48:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:48:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:48:24] Production.INFO: ==870== Releasing lock... [2025-03-03 02:48:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:48:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:49:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:49:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:49:16] Production.INFO: count ==409 [2025-03-03 02:49:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:49:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595510', 'tblTempUsageDetail_20' ) start [2025-03-03 02:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595510', 'tblTempUsageDetail_20' ) end [2025-03-03 02:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595510', 'tblTempVendorCDR_20' ) start [2025-03-03 02:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595510', 'tblTempVendorCDR_20' ) end [2025-03-03 02:49:16] Production.INFO: ProcessCDR(1,14595510,1,1,2) [2025-03-03 02:49:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595510,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:49:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595510,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:49:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595510,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:49:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595510,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:49:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595510', 'tblTempUsageDetail_20' ) start [2025-03-03 02:49:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595510', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:49:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:49:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:49:24] Production.INFO: ==967== Releasing lock... [2025-03-03 02:49:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:49:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:50:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:50:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:50:16] Production.INFO: count ==409 [2025-03-03 02:50:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:50:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:50:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595515', 'tblTempUsageDetail_20' ) start [2025-03-03 02:50:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595515', 'tblTempUsageDetail_20' ) end [2025-03-03 02:50:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595515', 'tblTempVendorCDR_20' ) start [2025-03-03 02:50:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595515', 'tblTempVendorCDR_20' ) end [2025-03-03 02:50:16] Production.INFO: ProcessCDR(1,14595515,1,1,2) [2025-03-03 02:50:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595515,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:50:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595515,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:50:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595515,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:50:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595515,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:50:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595515', 'tblTempUsageDetail_20' ) start [2025-03-03 02:50:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595515', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:50:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:50:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:50:24] Production.INFO: ==1045== Releasing lock... [2025-03-03 02:50:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:50:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:51:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:51:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:51:17] Production.INFO: count ==409 [2025-03-03 02:51:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:51:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595521', 'tblTempUsageDetail_20' ) start [2025-03-03 02:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595521', 'tblTempUsageDetail_20' ) end [2025-03-03 02:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595521', 'tblTempVendorCDR_20' ) start [2025-03-03 02:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595521', 'tblTempVendorCDR_20' ) end [2025-03-03 02:51:17] Production.INFO: ProcessCDR(1,14595521,1,1,2) [2025-03-03 02:51:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595521,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:51:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595521,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:51:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595521,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:51:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595521,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:51:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595521', 'tblTempUsageDetail_20' ) start [2025-03-03 02:51:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595521', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:51:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:51:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:51:25] Production.INFO: ==1120== Releasing lock... [2025-03-03 02:51:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:51:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:52:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:52:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:52:16] Production.INFO: count ==409 [2025-03-03 02:52:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:52:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:52:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595526', 'tblTempUsageDetail_20' ) start [2025-03-03 02:52:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595526', 'tblTempUsageDetail_20' ) end [2025-03-03 02:52:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595526', 'tblTempVendorCDR_20' ) start [2025-03-03 02:52:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595526', 'tblTempVendorCDR_20' ) end [2025-03-03 02:52:16] Production.INFO: ProcessCDR(1,14595526,1,1,2) [2025-03-03 02:52:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595526,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:52:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595526,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:52:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595526,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:52:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595526,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:52:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595526', 'tblTempUsageDetail_20' ) start [2025-03-03 02:52:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595526', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:52:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:52:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:52:24] Production.INFO: ==1212== Releasing lock... [2025-03-03 02:52:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:52:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:53:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:53:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:53:16] Production.INFO: count ==409 [2025-03-03 02:53:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:53:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595531', 'tblTempUsageDetail_20' ) start [2025-03-03 02:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595531', 'tblTempUsageDetail_20' ) end [2025-03-03 02:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595531', 'tblTempVendorCDR_20' ) start [2025-03-03 02:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595531', 'tblTempVendorCDR_20' ) end [2025-03-03 02:53:16] Production.INFO: ProcessCDR(1,14595531,1,1,2) [2025-03-03 02:53:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595531,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:53:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595531,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:53:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595531,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:53:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595531,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595531', 'tblTempUsageDetail_20' ) start [2025-03-03 02:53:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595531', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:53:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:53:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:53:24] Production.INFO: ==1308== Releasing lock... [2025-03-03 02:53:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:53:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:54:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:54:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:54:16] Production.INFO: count ==409 [2025-03-03 02:54:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:54:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:54:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595536', 'tblTempUsageDetail_20' ) start [2025-03-03 02:54:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595536', 'tblTempUsageDetail_20' ) end [2025-03-03 02:54:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595536', 'tblTempVendorCDR_20' ) start [2025-03-03 02:54:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595536', 'tblTempVendorCDR_20' ) end [2025-03-03 02:54:16] Production.INFO: ProcessCDR(1,14595536,1,1,2) [2025-03-03 02:54:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595536,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:54:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595536,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:54:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595536,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:54:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595536,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:54:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595536', 'tblTempUsageDetail_20' ) start [2025-03-03 02:54:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595536', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:54:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:54:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:54:24] Production.INFO: ==1381== Releasing lock... [2025-03-03 02:54:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:54:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:55:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:55:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:55:16] Production.INFO: count ==409 [2025-03-03 02:55:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:55:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595541', 'tblTempUsageDetail_20' ) start [2025-03-03 02:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595541', 'tblTempUsageDetail_20' ) end [2025-03-03 02:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595541', 'tblTempVendorCDR_20' ) start [2025-03-03 02:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595541', 'tblTempVendorCDR_20' ) end [2025-03-03 02:55:17] Production.INFO: ProcessCDR(1,14595541,1,1,2) [2025-03-03 02:55:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595541,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:55:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595541,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:55:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595541,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:55:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595541,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:55:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595541', 'tblTempUsageDetail_20' ) start [2025-03-03 02:55:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595541', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:55:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:55:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:55:24] Production.INFO: ==1501== Releasing lock... [2025-03-03 02:55:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:55:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:56:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:56:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:56:17] Production.INFO: count ==409 [2025-03-03 02:56:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:56:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595546', 'tblTempUsageDetail_20' ) start [2025-03-03 02:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595546', 'tblTempUsageDetail_20' ) end [2025-03-03 02:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595546', 'tblTempVendorCDR_20' ) start [2025-03-03 02:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595546', 'tblTempVendorCDR_20' ) end [2025-03-03 02:56:17] Production.INFO: ProcessCDR(1,14595546,1,1,2) [2025-03-03 02:56:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595546,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:56:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595546,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:56:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595546,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:56:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595546,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:56:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595546', 'tblTempUsageDetail_20' ) start [2025-03-03 02:56:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595546', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:56:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:56:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:56:25] Production.INFO: ==1618== Releasing lock... [2025-03-03 02:56:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:56:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:57:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:57:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:57:16] Production.INFO: count ==409 [2025-03-03 02:57:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:57:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595551', 'tblTempUsageDetail_20' ) start [2025-03-03 02:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595551', 'tblTempUsageDetail_20' ) end [2025-03-03 02:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595551', 'tblTempVendorCDR_20' ) start [2025-03-03 02:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595551', 'tblTempVendorCDR_20' ) end [2025-03-03 02:57:16] Production.INFO: ProcessCDR(1,14595551,1,1,2) [2025-03-03 02:57:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595551,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:57:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595551,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:57:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595551,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:57:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595551,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:57:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595551', 'tblTempUsageDetail_20' ) start [2025-03-03 02:57:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595551', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:57:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:57:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:57:23] Production.INFO: ==1713== Releasing lock... [2025-03-03 02:57:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:57:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:58:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:58:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:58:17] Production.INFO: count ==409 [2025-03-03 02:58:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:58:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595556', 'tblTempUsageDetail_20' ) start [2025-03-03 02:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595556', 'tblTempUsageDetail_20' ) end [2025-03-03 02:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595556', 'tblTempVendorCDR_20' ) start [2025-03-03 02:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595556', 'tblTempVendorCDR_20' ) end [2025-03-03 02:58:17] Production.INFO: ProcessCDR(1,14595556,1,1,2) [2025-03-03 02:58:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595556,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:58:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595556,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:58:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595556,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:58:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595556,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:58:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595556', 'tblTempUsageDetail_20' ) start [2025-03-03 02:58:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595556', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:58:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:58:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:58:25] Production.INFO: ==1802== Releasing lock... [2025-03-03 02:58:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:58:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 02:59:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 02:59:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 02:59:16] Production.INFO: count ==409 [2025-03-03 02:59:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 02:59:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 02:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595561', 'tblTempUsageDetail_20' ) start [2025-03-03 02:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595561', 'tblTempUsageDetail_20' ) end [2025-03-03 02:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595561', 'tblTempVendorCDR_20' ) start [2025-03-03 02:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595561', 'tblTempVendorCDR_20' ) end [2025-03-03 02:59:16] Production.INFO: ProcessCDR(1,14595561,1,1,2) [2025-03-03 02:59:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595561,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:59:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595561,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 02:59:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595561,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:59:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595561,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 02:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595561', 'tblTempUsageDetail_20' ) start [2025-03-03 02:59:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595561', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 02:59:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 02:59:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 02:59:24] Production.INFO: ==1918== Releasing lock... [2025-03-03 02:59:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 02:59:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:00:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:00:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:00:17] Production.INFO: count ==409 [2025-03-03 03:00:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:00:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595566', 'tblTempUsageDetail_20' ) start [2025-03-03 03:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595566', 'tblTempUsageDetail_20' ) end [2025-03-03 03:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595566', 'tblTempVendorCDR_20' ) start [2025-03-03 03:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595566', 'tblTempVendorCDR_20' ) end [2025-03-03 03:00:17] Production.INFO: ProcessCDR(1,14595566,1,1,2) [2025-03-03 03:00:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595566,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:00:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595566,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:00:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595566,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:00:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595566,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:00:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595566', 'tblTempUsageDetail_20' ) start [2025-03-03 03:00:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595566', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:00:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:00:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:00:25] Production.INFO: ==2013== Releasing lock... [2025-03-03 03:00:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:00:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:01:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:01:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:01:16] Production.INFO: count ==409 [2025-03-03 03:01:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:01:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595572', 'tblTempUsageDetail_20' ) start [2025-03-03 03:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595572', 'tblTempUsageDetail_20' ) end [2025-03-03 03:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595572', 'tblTempVendorCDR_20' ) start [2025-03-03 03:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595572', 'tblTempVendorCDR_20' ) end [2025-03-03 03:01:16] Production.INFO: ProcessCDR(1,14595572,1,1,2) [2025-03-03 03:01:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595572,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:01:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595572,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:01:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595572,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:01:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595572,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595572', 'tblTempUsageDetail_20' ) start [2025-03-03 03:01:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595572', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:01:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:01:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:01:24] Production.INFO: ==2118== Releasing lock... [2025-03-03 03:01:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:01:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:02:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:02:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:02:16] Production.INFO: count ==409 [2025-03-03 03:02:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:02:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:02:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595577', 'tblTempUsageDetail_20' ) start [2025-03-03 03:02:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595577', 'tblTempUsageDetail_20' ) end [2025-03-03 03:02:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595577', 'tblTempVendorCDR_20' ) start [2025-03-03 03:02:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595577', 'tblTempVendorCDR_20' ) end [2025-03-03 03:02:16] Production.INFO: ProcessCDR(1,14595577,1,1,2) [2025-03-03 03:02:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595577,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:02:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595577,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:02:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595577,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:02:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595577,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:02:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595577', 'tblTempUsageDetail_20' ) start [2025-03-03 03:02:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595577', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:02:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:02:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:02:24] Production.INFO: ==2274== Releasing lock... [2025-03-03 03:02:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:02:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:03:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:03:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:03:16] Production.INFO: count ==409 [2025-03-03 03:03:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:03:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595582', 'tblTempUsageDetail_20' ) start [2025-03-03 03:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595582', 'tblTempUsageDetail_20' ) end [2025-03-03 03:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595582', 'tblTempVendorCDR_20' ) start [2025-03-03 03:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595582', 'tblTempVendorCDR_20' ) end [2025-03-03 03:03:17] Production.INFO: ProcessCDR(1,14595582,1,1,2) [2025-03-03 03:03:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595582,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:03:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595582,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:03:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595582,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:03:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595582,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:03:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595582', 'tblTempUsageDetail_20' ) start [2025-03-03 03:03:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595582', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:03:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:03:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:03:25] Production.INFO: ==2347== Releasing lock... [2025-03-03 03:03:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:03:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:04:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:04:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:04:16] Production.INFO: count ==409 [2025-03-03 03:04:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:04:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595587', 'tblTempUsageDetail_20' ) start [2025-03-03 03:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595587', 'tblTempUsageDetail_20' ) end [2025-03-03 03:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595587', 'tblTempVendorCDR_20' ) start [2025-03-03 03:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595587', 'tblTempVendorCDR_20' ) end [2025-03-03 03:04:17] Production.INFO: ProcessCDR(1,14595587,1,1,2) [2025-03-03 03:04:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595587,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:04:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595587,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:04:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595587,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:04:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595587,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:04:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595587', 'tblTempUsageDetail_20' ) start [2025-03-03 03:04:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595587', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:04:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:04:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:04:25] Production.INFO: ==2419== Releasing lock... [2025-03-03 03:04:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:04:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:05:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:05:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:05:16] Production.INFO: count ==409 [2025-03-03 03:05:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:05:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595592', 'tblTempUsageDetail_20' ) start [2025-03-03 03:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595592', 'tblTempUsageDetail_20' ) end [2025-03-03 03:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595592', 'tblTempVendorCDR_20' ) start [2025-03-03 03:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595592', 'tblTempVendorCDR_20' ) end [2025-03-03 03:05:16] Production.INFO: ProcessCDR(1,14595592,1,1,2) [2025-03-03 03:05:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595592,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:05:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595592,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:05:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595592,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:05:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595592,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:05:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595592', 'tblTempUsageDetail_20' ) start [2025-03-03 03:05:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595592', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:05:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:05:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:05:24] Production.INFO: ==2503== Releasing lock... [2025-03-03 03:05:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:05:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:06:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:06:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:06:16] Production.INFO: count ==409 [2025-03-03 03:06:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:06:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595597', 'tblTempUsageDetail_20' ) start [2025-03-03 03:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595597', 'tblTempUsageDetail_20' ) end [2025-03-03 03:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595597', 'tblTempVendorCDR_20' ) start [2025-03-03 03:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595597', 'tblTempVendorCDR_20' ) end [2025-03-03 03:06:16] Production.INFO: ProcessCDR(1,14595597,1,1,2) [2025-03-03 03:06:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595597,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:06:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595597,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:06:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595597,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:06:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595597,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:06:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595597', 'tblTempUsageDetail_20' ) start [2025-03-03 03:06:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595597', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:06:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:06:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:06:24] Production.INFO: ==2657== Releasing lock... [2025-03-03 03:06:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:06:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:07:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:07:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:07:16] Production.INFO: count ==409 [2025-03-03 03:07:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:07:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:07:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595602', 'tblTempUsageDetail_20' ) start [2025-03-03 03:07:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595602', 'tblTempUsageDetail_20' ) end [2025-03-03 03:07:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595602', 'tblTempVendorCDR_20' ) start [2025-03-03 03:07:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595602', 'tblTempVendorCDR_20' ) end [2025-03-03 03:07:16] Production.INFO: ProcessCDR(1,14595602,1,1,2) [2025-03-03 03:07:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595602,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:07:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595602,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:07:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595602,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:07:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595602,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:07:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595602', 'tblTempUsageDetail_20' ) start [2025-03-03 03:07:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595602', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:07:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:07:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:07:24] Production.INFO: ==2727== Releasing lock... [2025-03-03 03:07:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:07:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:08:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:08:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:08:16] Production.INFO: count ==409 [2025-03-03 03:08:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:08:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595607', 'tblTempUsageDetail_20' ) start [2025-03-03 03:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595607', 'tblTempUsageDetail_20' ) end [2025-03-03 03:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595607', 'tblTempVendorCDR_20' ) start [2025-03-03 03:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595607', 'tblTempVendorCDR_20' ) end [2025-03-03 03:08:16] Production.INFO: ProcessCDR(1,14595607,1,1,2) [2025-03-03 03:08:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595607,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:08:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595607,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:08:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595607,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:08:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595607,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:08:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595607', 'tblTempUsageDetail_20' ) start [2025-03-03 03:08:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595607', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:08:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:08:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:08:24] Production.INFO: ==2810== Releasing lock... [2025-03-03 03:08:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:08:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:09:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:09:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:09:16] Production.INFO: count ==409 [2025-03-03 03:09:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:09:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595612', 'tblTempUsageDetail_20' ) start [2025-03-03 03:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595612', 'tblTempUsageDetail_20' ) end [2025-03-03 03:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595612', 'tblTempVendorCDR_20' ) start [2025-03-03 03:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595612', 'tblTempVendorCDR_20' ) end [2025-03-03 03:09:16] Production.INFO: ProcessCDR(1,14595612,1,1,2) [2025-03-03 03:09:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595612,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:09:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595612,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:09:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595612,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:09:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595612,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:09:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595612', 'tblTempUsageDetail_20' ) start [2025-03-03 03:09:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595612', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:09:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:09:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:09:24] Production.INFO: ==2961== Releasing lock... [2025-03-03 03:09:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:09:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:10:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:10:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:10:17] Production.INFO: count ==409 [2025-03-03 03:10:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:10:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595618', 'tblTempUsageDetail_20' ) start [2025-03-03 03:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595618', 'tblTempUsageDetail_20' ) end [2025-03-03 03:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595618', 'tblTempVendorCDR_20' ) start [2025-03-03 03:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595618', 'tblTempVendorCDR_20' ) end [2025-03-03 03:10:18] Production.INFO: ProcessCDR(1,14595618,1,1,2) [2025-03-03 03:10:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595618,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:10:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595618,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:10:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595618,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:10:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595618,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:10:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595618', 'tblTempUsageDetail_20' ) start [2025-03-03 03:10:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595618', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:10:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:10:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:10:25] Production.INFO: ==3090== Releasing lock... [2025-03-03 03:10:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:10:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:11:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:11:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:11:16] Production.INFO: count ==409 [2025-03-03 03:11:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:11:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:11:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595623', 'tblTempUsageDetail_20' ) start [2025-03-03 03:11:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595623', 'tblTempUsageDetail_20' ) end [2025-03-03 03:11:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595623', 'tblTempVendorCDR_20' ) start [2025-03-03 03:11:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595623', 'tblTempVendorCDR_20' ) end [2025-03-03 03:11:16] Production.INFO: ProcessCDR(1,14595623,1,1,2) [2025-03-03 03:11:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595623,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:11:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595623,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:11:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595623,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:11:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595623,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:11:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595623', 'tblTempUsageDetail_20' ) start [2025-03-03 03:11:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595623', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:11:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:11:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:11:23] Production.INFO: ==3198== Releasing lock... [2025-03-03 03:11:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:11:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:12:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:12:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:12:16] Production.INFO: count ==409 [2025-03-03 03:12:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:12:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595628', 'tblTempUsageDetail_20' ) start [2025-03-03 03:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595628', 'tblTempUsageDetail_20' ) end [2025-03-03 03:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595628', 'tblTempVendorCDR_20' ) start [2025-03-03 03:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595628', 'tblTempVendorCDR_20' ) end [2025-03-03 03:12:16] Production.INFO: ProcessCDR(1,14595628,1,1,2) [2025-03-03 03:12:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595628,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:12:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595628,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:12:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595628,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:12:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595628,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:12:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595628', 'tblTempUsageDetail_20' ) start [2025-03-03 03:12:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595628', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:12:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:12:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:12:24] Production.INFO: ==3274== Releasing lock... [2025-03-03 03:12:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:12:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:13:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:13:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:13:16] Production.INFO: count ==409 [2025-03-03 03:13:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:13:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:13:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595633', 'tblTempUsageDetail_20' ) start [2025-03-03 03:13:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595633', 'tblTempUsageDetail_20' ) end [2025-03-03 03:13:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595633', 'tblTempVendorCDR_20' ) start [2025-03-03 03:13:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595633', 'tblTempVendorCDR_20' ) end [2025-03-03 03:13:16] Production.INFO: ProcessCDR(1,14595633,1,1,2) [2025-03-03 03:13:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595633,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:13:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595633,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:13:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595633,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:13:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595633,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:13:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595633', 'tblTempUsageDetail_20' ) start [2025-03-03 03:13:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595633', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:13:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:13:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:13:25] Production.INFO: ==3440== Releasing lock... [2025-03-03 03:13:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:13:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:14:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:14:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:14:17] Production.INFO: count ==409 [2025-03-03 03:14:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:14:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595638', 'tblTempUsageDetail_20' ) start [2025-03-03 03:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595638', 'tblTempUsageDetail_20' ) end [2025-03-03 03:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595638', 'tblTempVendorCDR_20' ) start [2025-03-03 03:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595638', 'tblTempVendorCDR_20' ) end [2025-03-03 03:14:17] Production.INFO: ProcessCDR(1,14595638,1,1,2) [2025-03-03 03:14:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595638,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:14:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595638,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:14:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595638,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:14:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595638,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:14:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595638', 'tblTempUsageDetail_20' ) start [2025-03-03 03:14:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595638', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:14:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:14:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:14:26] Production.INFO: ==3512== Releasing lock... [2025-03-03 03:14:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:14:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:15:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:15:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:15:16] Production.INFO: count ==409 [2025-03-03 03:15:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:15:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595643', 'tblTempUsageDetail_20' ) start [2025-03-03 03:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595643', 'tblTempUsageDetail_20' ) end [2025-03-03 03:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595643', 'tblTempVendorCDR_20' ) start [2025-03-03 03:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595643', 'tblTempVendorCDR_20' ) end [2025-03-03 03:15:16] Production.INFO: ProcessCDR(1,14595643,1,1,2) [2025-03-03 03:15:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595643,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:15:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595643,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:15:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595643,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:15:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595643,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:15:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595643', 'tblTempUsageDetail_20' ) start [2025-03-03 03:15:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595643', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:15:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:15:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:15:25] Production.INFO: ==3591== Releasing lock... [2025-03-03 03:15:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:15:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:16:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:16:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:16:16] Production.INFO: count ==409 [2025-03-03 03:16:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:16:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595648', 'tblTempUsageDetail_20' ) start [2025-03-03 03:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595648', 'tblTempUsageDetail_20' ) end [2025-03-03 03:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595648', 'tblTempVendorCDR_20' ) start [2025-03-03 03:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595648', 'tblTempVendorCDR_20' ) end [2025-03-03 03:16:17] Production.INFO: ProcessCDR(1,14595648,1,1,2) [2025-03-03 03:16:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595648,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:16:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595648,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:16:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595648,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:16:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595648,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:16:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595648', 'tblTempUsageDetail_20' ) start [2025-03-03 03:16:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595648', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:16:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:16:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:16:25] Production.INFO: ==3674== Releasing lock... [2025-03-03 03:16:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:16:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:17:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:17:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:17:16] Production.INFO: count ==409 [2025-03-03 03:17:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:17:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595653', 'tblTempUsageDetail_20' ) start [2025-03-03 03:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595653', 'tblTempUsageDetail_20' ) end [2025-03-03 03:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595653', 'tblTempVendorCDR_20' ) start [2025-03-03 03:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595653', 'tblTempVendorCDR_20' ) end [2025-03-03 03:17:16] Production.INFO: ProcessCDR(1,14595653,1,1,2) [2025-03-03 03:17:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595653,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:17:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595653,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:17:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595653,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:17:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595653,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595653', 'tblTempUsageDetail_20' ) start [2025-03-03 03:17:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595653', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:17:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:17:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:17:24] Production.INFO: ==3820== Releasing lock... [2025-03-03 03:17:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:17:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:18:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:18:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:18:17] Production.INFO: count ==409 [2025-03-03 03:18:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:18:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595658', 'tblTempUsageDetail_20' ) start [2025-03-03 03:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595658', 'tblTempUsageDetail_20' ) end [2025-03-03 03:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595658', 'tblTempVendorCDR_20' ) start [2025-03-03 03:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595658', 'tblTempVendorCDR_20' ) end [2025-03-03 03:18:17] Production.INFO: ProcessCDR(1,14595658,1,1,2) [2025-03-03 03:18:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595658,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:18:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595658,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:18:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595658,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:18:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595658,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:18:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595658', 'tblTempUsageDetail_20' ) start [2025-03-03 03:18:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595658', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:18:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:18:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:18:25] Production.INFO: ==3916== Releasing lock... [2025-03-03 03:18:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:18:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:19:03] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:19:03] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:19:16] Production.INFO: count ==409 [2025-03-03 03:19:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:19:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595663', 'tblTempUsageDetail_20' ) start [2025-03-03 03:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595663', 'tblTempUsageDetail_20' ) end [2025-03-03 03:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595663', 'tblTempVendorCDR_20' ) start [2025-03-03 03:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595663', 'tblTempVendorCDR_20' ) end [2025-03-03 03:19:16] Production.INFO: ProcessCDR(1,14595663,1,1,2) [2025-03-03 03:19:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595663,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:19:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595663,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:19:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595663,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:19:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595663,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:19:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595663', 'tblTempUsageDetail_20' ) start [2025-03-03 03:19:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595663', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:19:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:19:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:19:24] Production.INFO: ==3991== Releasing lock... [2025-03-03 03:19:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:19:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:20:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:20:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:20:17] Production.INFO: count ==409 [2025-03-03 03:20:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:20:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595669', 'tblTempUsageDetail_20' ) start [2025-03-03 03:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595669', 'tblTempUsageDetail_20' ) end [2025-03-03 03:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595669', 'tblTempVendorCDR_20' ) start [2025-03-03 03:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595669', 'tblTempVendorCDR_20' ) end [2025-03-03 03:20:17] Production.INFO: ProcessCDR(1,14595669,1,1,2) [2025-03-03 03:20:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595669,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:20:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595669,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:20:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595669,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:20:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595669,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595669', 'tblTempUsageDetail_20' ) start [2025-03-03 03:20:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595669', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:20:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:20:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:20:25] Production.INFO: ==4065== Releasing lock... [2025-03-03 03:20:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:20:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:21:03] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:21:03] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:21:15] Production.INFO: count ==409 [2025-03-03 03:21:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:21:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595674', 'tblTempUsageDetail_20' ) start [2025-03-03 03:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595674', 'tblTempUsageDetail_20' ) end [2025-03-03 03:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595674', 'tblTempVendorCDR_20' ) start [2025-03-03 03:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595674', 'tblTempVendorCDR_20' ) end [2025-03-03 03:21:16] Production.INFO: ProcessCDR(1,14595674,1,1,2) [2025-03-03 03:21:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595674,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:21:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595674,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:21:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595674,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:21:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595674,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:21:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595674', 'tblTempUsageDetail_20' ) start [2025-03-03 03:21:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595674', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:21:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:21:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:21:23] Production.INFO: ==4148== Releasing lock... [2025-03-03 03:21:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:21:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:22:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:22:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:22:16] Production.INFO: count ==409 [2025-03-03 03:22:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:22:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:22:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595679', 'tblTempUsageDetail_20' ) start [2025-03-03 03:22:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595679', 'tblTempUsageDetail_20' ) end [2025-03-03 03:22:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595679', 'tblTempVendorCDR_20' ) start [2025-03-03 03:22:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595679', 'tblTempVendorCDR_20' ) end [2025-03-03 03:22:16] Production.INFO: ProcessCDR(1,14595679,1,1,2) [2025-03-03 03:22:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595679,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:22:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595679,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:22:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595679,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:22:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595679,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595679', 'tblTempUsageDetail_20' ) start [2025-03-03 03:22:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595679', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:22:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:22:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:22:24] Production.INFO: ==4220== Releasing lock... [2025-03-03 03:22:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:22:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:23:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:23:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:23:16] Production.INFO: count ==409 [2025-03-03 03:23:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:23:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595684', 'tblTempUsageDetail_20' ) start [2025-03-03 03:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595684', 'tblTempUsageDetail_20' ) end [2025-03-03 03:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595684', 'tblTempVendorCDR_20' ) start [2025-03-03 03:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595684', 'tblTempVendorCDR_20' ) end [2025-03-03 03:23:17] Production.INFO: ProcessCDR(1,14595684,1,1,2) [2025-03-03 03:23:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595684,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:23:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595684,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:23:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595684,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:23:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595684,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:23:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595684', 'tblTempUsageDetail_20' ) start [2025-03-03 03:23:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595684', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:23:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:23:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:23:24] Production.INFO: ==4303== Releasing lock... [2025-03-03 03:23:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:23:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:24:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:24:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:24:17] Production.INFO: count ==409 [2025-03-03 03:24:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:24:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595689', 'tblTempUsageDetail_20' ) start [2025-03-03 03:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595689', 'tblTempUsageDetail_20' ) end [2025-03-03 03:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595689', 'tblTempVendorCDR_20' ) start [2025-03-03 03:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595689', 'tblTempVendorCDR_20' ) end [2025-03-03 03:24:17] Production.INFO: ProcessCDR(1,14595689,1,1,2) [2025-03-03 03:24:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595689,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:24:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595689,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:24:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595689,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:24:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595689,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:24:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595689', 'tblTempUsageDetail_20' ) start [2025-03-03 03:24:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595689', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:24:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:24:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:24:24] Production.INFO: ==4392== Releasing lock... [2025-03-03 03:24:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:24:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:25:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:25:16] Production.INFO: count ==409 [2025-03-03 03:25:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:25:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595694', 'tblTempUsageDetail_20' ) start [2025-03-03 03:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595694', 'tblTempUsageDetail_20' ) end [2025-03-03 03:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595694', 'tblTempVendorCDR_20' ) start [2025-03-03 03:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595694', 'tblTempVendorCDR_20' ) end [2025-03-03 03:25:17] Production.INFO: ProcessCDR(1,14595694,1,1,2) [2025-03-03 03:25:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595694,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:25:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595694,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:25:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595694,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:25:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595694,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595694', 'tblTempUsageDetail_20' ) start [2025-03-03 03:25:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595694', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:25:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:25:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:25:24] Production.INFO: ==4475== Releasing lock... [2025-03-03 03:25:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:25:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:26:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:26:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:26:16] Production.INFO: count ==409 [2025-03-03 03:26:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:26:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:26:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595699', 'tblTempUsageDetail_20' ) start [2025-03-03 03:26:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595699', 'tblTempUsageDetail_20' ) end [2025-03-03 03:26:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595699', 'tblTempVendorCDR_20' ) start [2025-03-03 03:26:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595699', 'tblTempVendorCDR_20' ) end [2025-03-03 03:26:16] Production.INFO: ProcessCDR(1,14595699,1,1,2) [2025-03-03 03:26:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595699,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:26:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595699,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:26:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595699,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:26:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595699,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:26:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595699', 'tblTempUsageDetail_20' ) start [2025-03-03 03:26:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595699', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:26:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:26:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:26:25] Production.INFO: ==4565== Releasing lock... [2025-03-03 03:26:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:26:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:27:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:27:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:27:16] Production.INFO: count ==409 [2025-03-03 03:27:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:27:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595704', 'tblTempUsageDetail_20' ) start [2025-03-03 03:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595704', 'tblTempUsageDetail_20' ) end [2025-03-03 03:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595704', 'tblTempVendorCDR_20' ) start [2025-03-03 03:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595704', 'tblTempVendorCDR_20' ) end [2025-03-03 03:27:16] Production.INFO: ProcessCDR(1,14595704,1,1,2) [2025-03-03 03:27:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595704,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:27:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595704,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:27:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595704,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:27:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595704,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:27:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595704', 'tblTempUsageDetail_20' ) start [2025-03-03 03:27:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595704', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:27:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:27:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:27:24] Production.INFO: ==4698== Releasing lock... [2025-03-03 03:27:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:27:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:28:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:28:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:28:16] Production.INFO: count ==409 [2025-03-03 03:28:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:28:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:28:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595709', 'tblTempUsageDetail_20' ) start [2025-03-03 03:28:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595709', 'tblTempUsageDetail_20' ) end [2025-03-03 03:28:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595709', 'tblTempVendorCDR_20' ) start [2025-03-03 03:28:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595709', 'tblTempVendorCDR_20' ) end [2025-03-03 03:28:16] Production.INFO: ProcessCDR(1,14595709,1,1,2) [2025-03-03 03:28:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595709,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:28:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595709,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:28:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595709,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:28:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595709,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:28:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595709', 'tblTempUsageDetail_20' ) start [2025-03-03 03:28:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595709', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:28:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:28:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:28:24] Production.INFO: ==4779== Releasing lock... [2025-03-03 03:28:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:28:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:29:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:29:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:29:16] Production.INFO: count ==409 [2025-03-03 03:29:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:29:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595714', 'tblTempUsageDetail_20' ) start [2025-03-03 03:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595714', 'tblTempUsageDetail_20' ) end [2025-03-03 03:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595714', 'tblTempVendorCDR_20' ) start [2025-03-03 03:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595714', 'tblTempVendorCDR_20' ) end [2025-03-03 03:29:16] Production.INFO: ProcessCDR(1,14595714,1,1,2) [2025-03-03 03:29:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595714,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:29:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595714,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:29:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595714,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:29:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595714,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:29:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595714', 'tblTempUsageDetail_20' ) start [2025-03-03 03:29:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595714', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:29:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:29:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:29:24] Production.INFO: ==4857== Releasing lock... [2025-03-03 03:29:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:29:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:30:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:30:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:30:16] Production.INFO: count ==409 [2025-03-03 03:30:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:30:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:30:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595720', 'tblTempUsageDetail_20' ) start [2025-03-03 03:30:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595720', 'tblTempUsageDetail_20' ) end [2025-03-03 03:30:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595720', 'tblTempVendorCDR_20' ) start [2025-03-03 03:30:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595720', 'tblTempVendorCDR_20' ) end [2025-03-03 03:30:16] Production.INFO: ProcessCDR(1,14595720,1,1,2) [2025-03-03 03:30:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595720,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:30:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595720,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:30:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595720,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:30:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595720,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:30:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595720', 'tblTempUsageDetail_20' ) start [2025-03-03 03:30:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595720', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:30:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:30:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:30:24] Production.INFO: ==4940== Releasing lock... [2025-03-03 03:30:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:30:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:31:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:31:17] Production.INFO: count ==409 [2025-03-03 03:31:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:31:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595725', 'tblTempUsageDetail_20' ) start [2025-03-03 03:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595725', 'tblTempUsageDetail_20' ) end [2025-03-03 03:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595725', 'tblTempVendorCDR_20' ) start [2025-03-03 03:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595725', 'tblTempVendorCDR_20' ) end [2025-03-03 03:31:17] Production.INFO: ProcessCDR(1,14595725,1,1,2) [2025-03-03 03:31:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595725,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:31:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595725,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:31:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595725,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:31:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595725,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:31:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595725', 'tblTempUsageDetail_20' ) start [2025-03-03 03:31:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595725', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:31:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:31:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:31:25] Production.INFO: ==5037== Releasing lock... [2025-03-03 03:31:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:31:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:32:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:32:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:32:16] Production.INFO: count ==409 [2025-03-03 03:32:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:32:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595730', 'tblTempUsageDetail_20' ) start [2025-03-03 03:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595730', 'tblTempUsageDetail_20' ) end [2025-03-03 03:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595730', 'tblTempVendorCDR_20' ) start [2025-03-03 03:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595730', 'tblTempVendorCDR_20' ) end [2025-03-03 03:32:16] Production.INFO: ProcessCDR(1,14595730,1,1,2) [2025-03-03 03:32:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595730,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:32:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595730,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:32:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595730,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:32:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595730,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:32:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595730', 'tblTempUsageDetail_20' ) start [2025-03-03 03:32:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595730', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:32:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:32:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:32:24] Production.INFO: ==5115== Releasing lock... [2025-03-03 03:32:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:32:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:33:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:33:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:33:16] Production.INFO: count ==409 [2025-03-03 03:33:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:33:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595735', 'tblTempUsageDetail_20' ) start [2025-03-03 03:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595735', 'tblTempUsageDetail_20' ) end [2025-03-03 03:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595735', 'tblTempVendorCDR_20' ) start [2025-03-03 03:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595735', 'tblTempVendorCDR_20' ) end [2025-03-03 03:33:16] Production.INFO: ProcessCDR(1,14595735,1,1,2) [2025-03-03 03:33:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595735,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:33:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595735,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:33:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595735,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:33:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595735,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:33:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595735', 'tblTempUsageDetail_20' ) start [2025-03-03 03:33:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595735', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:33:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:33:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:33:25] Production.INFO: ==5193== Releasing lock... [2025-03-03 03:33:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:33:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:34:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:34:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:34:16] Production.INFO: count ==409 [2025-03-03 03:34:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:34:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595740', 'tblTempUsageDetail_20' ) start [2025-03-03 03:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595740', 'tblTempUsageDetail_20' ) end [2025-03-03 03:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595740', 'tblTempVendorCDR_20' ) start [2025-03-03 03:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595740', 'tblTempVendorCDR_20' ) end [2025-03-03 03:34:16] Production.INFO: ProcessCDR(1,14595740,1,1,2) [2025-03-03 03:34:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595740,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:34:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595740,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:34:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595740,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:34:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595740,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:34:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595740', 'tblTempUsageDetail_20' ) start [2025-03-03 03:34:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595740', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:34:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:34:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:34:25] Production.INFO: ==5271== Releasing lock... [2025-03-03 03:34:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:34:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:35:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:35:17] Production.INFO: count ==409 [2025-03-03 03:35:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:35:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595745', 'tblTempUsageDetail_20' ) start [2025-03-03 03:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595745', 'tblTempUsageDetail_20' ) end [2025-03-03 03:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595745', 'tblTempVendorCDR_20' ) start [2025-03-03 03:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595745', 'tblTempVendorCDR_20' ) end [2025-03-03 03:35:17] Production.INFO: ProcessCDR(1,14595745,1,1,2) [2025-03-03 03:35:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595745,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:35:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595745,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:35:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595745,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:35:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595745,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:35:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595745', 'tblTempUsageDetail_20' ) start [2025-03-03 03:35:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595745', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:35:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:35:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:35:26] Production.INFO: ==5346== Releasing lock... [2025-03-03 03:35:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:35:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:36:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:36:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:36:16] Production.INFO: count ==409 [2025-03-03 03:36:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:36:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595750', 'tblTempUsageDetail_20' ) start [2025-03-03 03:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595750', 'tblTempUsageDetail_20' ) end [2025-03-03 03:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595750', 'tblTempVendorCDR_20' ) start [2025-03-03 03:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595750', 'tblTempVendorCDR_20' ) end [2025-03-03 03:36:16] Production.INFO: ProcessCDR(1,14595750,1,1,2) [2025-03-03 03:36:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595750,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:36:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595750,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:36:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595750,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:36:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595750,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:36:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595750', 'tblTempUsageDetail_20' ) start [2025-03-03 03:36:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595750', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:36:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:36:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:36:25] Production.INFO: ==5417== Releasing lock... [2025-03-03 03:36:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:36:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:37:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:37:17] Production.INFO: count ==409 [2025-03-03 03:37:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:37:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595755', 'tblTempUsageDetail_20' ) start [2025-03-03 03:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595755', 'tblTempUsageDetail_20' ) end [2025-03-03 03:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595755', 'tblTempVendorCDR_20' ) start [2025-03-03 03:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595755', 'tblTempVendorCDR_20' ) end [2025-03-03 03:37:17] Production.INFO: ProcessCDR(1,14595755,1,1,2) [2025-03-03 03:37:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595755,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:37:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595755,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:37:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595755,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:37:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595755,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:37:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595755', 'tblTempUsageDetail_20' ) start [2025-03-03 03:37:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595755', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:37:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:37:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:37:25] Production.INFO: ==5487== Releasing lock... [2025-03-03 03:37:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:37:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:38:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:38:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:38:16] Production.INFO: count ==409 [2025-03-03 03:38:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:38:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595760', 'tblTempUsageDetail_20' ) start [2025-03-03 03:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595760', 'tblTempUsageDetail_20' ) end [2025-03-03 03:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595760', 'tblTempVendorCDR_20' ) start [2025-03-03 03:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595760', 'tblTempVendorCDR_20' ) end [2025-03-03 03:38:16] Production.INFO: ProcessCDR(1,14595760,1,1,2) [2025-03-03 03:38:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595760,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:38:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595760,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:38:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595760,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:38:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595760,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:38:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595760', 'tblTempUsageDetail_20' ) start [2025-03-03 03:38:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595760', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:38:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:38:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:38:25] Production.INFO: ==5561== Releasing lock... [2025-03-03 03:38:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:38:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:39:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:39:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:39:16] Production.INFO: count ==409 [2025-03-03 03:39:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:39:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595765', 'tblTempUsageDetail_20' ) start [2025-03-03 03:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595765', 'tblTempUsageDetail_20' ) end [2025-03-03 03:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595765', 'tblTempVendorCDR_20' ) start [2025-03-03 03:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595765', 'tblTempVendorCDR_20' ) end [2025-03-03 03:39:16] Production.INFO: ProcessCDR(1,14595765,1,1,2) [2025-03-03 03:39:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595765,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:39:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595765,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:39:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595765,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:39:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595765,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:39:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595765', 'tblTempUsageDetail_20' ) start [2025-03-03 03:39:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595765', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:39:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:39:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:39:25] Production.INFO: ==5638== Releasing lock... [2025-03-03 03:39:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:39:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:40:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:40:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:40:16] Production.INFO: count ==409 [2025-03-03 03:40:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:40:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595771', 'tblTempUsageDetail_20' ) start [2025-03-03 03:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595771', 'tblTempUsageDetail_20' ) end [2025-03-03 03:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595771', 'tblTempVendorCDR_20' ) start [2025-03-03 03:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595771', 'tblTempVendorCDR_20' ) end [2025-03-03 03:40:17] Production.INFO: ProcessCDR(1,14595771,1,1,2) [2025-03-03 03:40:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595771,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:40:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595771,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:40:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595771,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:40:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595771,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:40:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595771', 'tblTempUsageDetail_20' ) start [2025-03-03 03:40:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595771', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:40:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:40:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:40:26] Production.INFO: ==5710== Releasing lock... [2025-03-03 03:40:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:40:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:41:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:41:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:41:16] Production.INFO: count ==409 [2025-03-03 03:41:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:41:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595776', 'tblTempUsageDetail_20' ) start [2025-03-03 03:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595776', 'tblTempUsageDetail_20' ) end [2025-03-03 03:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595776', 'tblTempVendorCDR_20' ) start [2025-03-03 03:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595776', 'tblTempVendorCDR_20' ) end [2025-03-03 03:41:16] Production.INFO: ProcessCDR(1,14595776,1,1,2) [2025-03-03 03:41:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595776,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:41:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595776,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:41:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595776,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:41:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595776,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:41:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595776', 'tblTempUsageDetail_20' ) start [2025-03-03 03:41:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595776', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:41:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:41:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:41:25] Production.INFO: ==5795== Releasing lock... [2025-03-03 03:41:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:41:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:42:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:42:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:42:16] Production.INFO: count ==409 [2025-03-03 03:42:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:42:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595781', 'tblTempUsageDetail_20' ) start [2025-03-03 03:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595781', 'tblTempUsageDetail_20' ) end [2025-03-03 03:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595781', 'tblTempVendorCDR_20' ) start [2025-03-03 03:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595781', 'tblTempVendorCDR_20' ) end [2025-03-03 03:42:16] Production.INFO: ProcessCDR(1,14595781,1,1,2) [2025-03-03 03:42:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595781,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:42:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595781,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:42:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595781,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:42:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595781,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:42:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595781', 'tblTempUsageDetail_20' ) start [2025-03-03 03:42:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595781', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:42:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:42:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:42:25] Production.INFO: ==5877== Releasing lock... [2025-03-03 03:42:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:42:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:43:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:43:16] Production.INFO: count ==409 [2025-03-03 03:43:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:43:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595786', 'tblTempUsageDetail_20' ) start [2025-03-03 03:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595786', 'tblTempUsageDetail_20' ) end [2025-03-03 03:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595786', 'tblTempVendorCDR_20' ) start [2025-03-03 03:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595786', 'tblTempVendorCDR_20' ) end [2025-03-03 03:43:17] Production.INFO: ProcessCDR(1,14595786,1,1,2) [2025-03-03 03:43:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595786,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:43:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595786,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:43:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595786,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:43:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595786,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:43:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595786', 'tblTempUsageDetail_20' ) start [2025-03-03 03:43:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595786', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:43:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:43:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:43:26] Production.INFO: ==5995== Releasing lock... [2025-03-03 03:43:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:43:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:44:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:44:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:44:16] Production.INFO: count ==409 [2025-03-03 03:44:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:44:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595791', 'tblTempUsageDetail_20' ) start [2025-03-03 03:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595791', 'tblTempUsageDetail_20' ) end [2025-03-03 03:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595791', 'tblTempVendorCDR_20' ) start [2025-03-03 03:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595791', 'tblTempVendorCDR_20' ) end [2025-03-03 03:44:16] Production.INFO: ProcessCDR(1,14595791,1,1,2) [2025-03-03 03:44:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595791,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:44:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595791,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:44:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595791,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:44:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595791,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:44:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595791', 'tblTempUsageDetail_20' ) start [2025-03-03 03:44:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595791', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:44:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:44:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:44:25] Production.INFO: ==6074== Releasing lock... [2025-03-03 03:44:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:44:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:45:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:45:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:45:16] Production.INFO: count ==409 [2025-03-03 03:45:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:45:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595796', 'tblTempUsageDetail_20' ) start [2025-03-03 03:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595796', 'tblTempUsageDetail_20' ) end [2025-03-03 03:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595796', 'tblTempVendorCDR_20' ) start [2025-03-03 03:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595796', 'tblTempVendorCDR_20' ) end [2025-03-03 03:45:16] Production.INFO: ProcessCDR(1,14595796,1,1,2) [2025-03-03 03:45:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595796,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:45:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595796,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:45:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595796,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:45:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595796,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:45:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595796', 'tblTempUsageDetail_20' ) start [2025-03-03 03:45:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595796', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:45:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:45:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:45:24] Production.INFO: ==6150== Releasing lock... [2025-03-03 03:45:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:45:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:46:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:46:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:46:17] Production.INFO: count ==409 [2025-03-03 03:46:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:46:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595801', 'tblTempUsageDetail_20' ) start [2025-03-03 03:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595801', 'tblTempUsageDetail_20' ) end [2025-03-03 03:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595801', 'tblTempVendorCDR_20' ) start [2025-03-03 03:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595801', 'tblTempVendorCDR_20' ) end [2025-03-03 03:46:17] Production.INFO: ProcessCDR(1,14595801,1,1,2) [2025-03-03 03:46:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595801,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:46:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595801,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:46:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595801,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:46:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595801,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:46:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595801', 'tblTempUsageDetail_20' ) start [2025-03-03 03:46:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595801', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:46:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:46:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:46:25] Production.INFO: ==6237== Releasing lock... [2025-03-03 03:46:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:46:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:47:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:47:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:47:16] Production.INFO: count ==409 [2025-03-03 03:47:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:47:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595806', 'tblTempUsageDetail_20' ) start [2025-03-03 03:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595806', 'tblTempUsageDetail_20' ) end [2025-03-03 03:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595806', 'tblTempVendorCDR_20' ) start [2025-03-03 03:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595806', 'tblTempVendorCDR_20' ) end [2025-03-03 03:47:16] Production.INFO: ProcessCDR(1,14595806,1,1,2) [2025-03-03 03:47:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595806,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:47:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595806,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:47:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595806,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:47:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595806,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:47:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595806', 'tblTempUsageDetail_20' ) start [2025-03-03 03:47:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595806', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:47:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:47:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:47:25] Production.INFO: ==6311== Releasing lock... [2025-03-03 03:47:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:47:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:48:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:48:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:48:17] Production.INFO: count ==409 [2025-03-03 03:48:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:48:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595811', 'tblTempUsageDetail_20' ) start [2025-03-03 03:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595811', 'tblTempUsageDetail_20' ) end [2025-03-03 03:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595811', 'tblTempVendorCDR_20' ) start [2025-03-03 03:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595811', 'tblTempVendorCDR_20' ) end [2025-03-03 03:48:17] Production.INFO: ProcessCDR(1,14595811,1,1,2) [2025-03-03 03:48:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595811,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:48:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595811,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:48:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595811,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:48:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595811,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:48:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595811', 'tblTempUsageDetail_20' ) start [2025-03-03 03:48:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595811', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:48:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:48:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:48:25] Production.INFO: ==6399== Releasing lock... [2025-03-03 03:48:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:48:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:49:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:49:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:49:16] Production.INFO: count ==409 [2025-03-03 03:49:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:49:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595816', 'tblTempUsageDetail_20' ) start [2025-03-03 03:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595816', 'tblTempUsageDetail_20' ) end [2025-03-03 03:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595816', 'tblTempVendorCDR_20' ) start [2025-03-03 03:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595816', 'tblTempVendorCDR_20' ) end [2025-03-03 03:49:17] Production.INFO: ProcessCDR(1,14595816,1,1,2) [2025-03-03 03:49:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595816,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:49:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595816,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:49:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595816,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:49:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595816,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:49:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595816', 'tblTempUsageDetail_20' ) start [2025-03-03 03:49:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595816', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:49:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:49:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:49:25] Production.INFO: ==6477== Releasing lock... [2025-03-03 03:49:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:49:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:50:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:50:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:50:17] Production.INFO: count ==409 [2025-03-03 03:50:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:50:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595822', 'tblTempUsageDetail_20' ) start [2025-03-03 03:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595822', 'tblTempUsageDetail_20' ) end [2025-03-03 03:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595822', 'tblTempVendorCDR_20' ) start [2025-03-03 03:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595822', 'tblTempVendorCDR_20' ) end [2025-03-03 03:50:18] Production.INFO: ProcessCDR(1,14595822,1,1,2) [2025-03-03 03:50:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595822,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:50:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595822,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:50:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595822,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:50:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595822,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:50:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595822', 'tblTempUsageDetail_20' ) start [2025-03-03 03:50:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595822', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:50:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:50:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:50:26] Production.INFO: ==6570== Releasing lock... [2025-03-03 03:50:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:50:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:51:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:51:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:51:16] Production.INFO: count ==409 [2025-03-03 03:51:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:51:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595827', 'tblTempUsageDetail_20' ) start [2025-03-03 03:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595827', 'tblTempUsageDetail_20' ) end [2025-03-03 03:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595827', 'tblTempVendorCDR_20' ) start [2025-03-03 03:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595827', 'tblTempVendorCDR_20' ) end [2025-03-03 03:51:17] Production.INFO: ProcessCDR(1,14595827,1,1,2) [2025-03-03 03:51:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595827,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:51:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595827,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:51:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595827,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:51:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595827,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:51:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595827', 'tblTempUsageDetail_20' ) start [2025-03-03 03:51:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595827', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:51:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:51:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:51:25] Production.INFO: ==6648== Releasing lock... [2025-03-03 03:51:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:51:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:52:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:52:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:52:17] Production.INFO: count ==409 [2025-03-03 03:52:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:52:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595832', 'tblTempUsageDetail_20' ) start [2025-03-03 03:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595832', 'tblTempUsageDetail_20' ) end [2025-03-03 03:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595832', 'tblTempVendorCDR_20' ) start [2025-03-03 03:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595832', 'tblTempVendorCDR_20' ) end [2025-03-03 03:52:17] Production.INFO: ProcessCDR(1,14595832,1,1,2) [2025-03-03 03:52:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595832,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:52:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595832,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:52:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595832,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:52:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595832,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:52:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595832', 'tblTempUsageDetail_20' ) start [2025-03-03 03:52:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595832', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:52:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:52:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:52:26] Production.INFO: ==6737== Releasing lock... [2025-03-03 03:52:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:52:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:53:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:53:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:53:16] Production.INFO: count ==409 [2025-03-03 03:53:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:53:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595837', 'tblTempUsageDetail_20' ) start [2025-03-03 03:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595837', 'tblTempUsageDetail_20' ) end [2025-03-03 03:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595837', 'tblTempVendorCDR_20' ) start [2025-03-03 03:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595837', 'tblTempVendorCDR_20' ) end [2025-03-03 03:53:16] Production.INFO: ProcessCDR(1,14595837,1,1,2) [2025-03-03 03:53:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595837,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:53:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595837,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:53:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595837,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:53:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595837,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595837', 'tblTempUsageDetail_20' ) start [2025-03-03 03:53:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595837', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:53:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:53:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:53:24] Production.INFO: ==6828== Releasing lock... [2025-03-03 03:53:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:53:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:54:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:54:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:54:16] Production.INFO: count ==409 [2025-03-03 03:54:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:54:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595842', 'tblTempUsageDetail_20' ) start [2025-03-03 03:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595842', 'tblTempUsageDetail_20' ) end [2025-03-03 03:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595842', 'tblTempVendorCDR_20' ) start [2025-03-03 03:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595842', 'tblTempVendorCDR_20' ) end [2025-03-03 03:54:17] Production.INFO: ProcessCDR(1,14595842,1,1,2) [2025-03-03 03:54:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595842,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:54:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595842,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:54:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595842,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:54:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595842,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:54:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595842', 'tblTempUsageDetail_20' ) start [2025-03-03 03:54:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595842', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:54:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:54:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:54:25] Production.INFO: ==6909== Releasing lock... [2025-03-03 03:54:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:54:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:55:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:55:17] Production.INFO: count ==409 [2025-03-03 03:55:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:55:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595847', 'tblTempUsageDetail_20' ) start [2025-03-03 03:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595847', 'tblTempUsageDetail_20' ) end [2025-03-03 03:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595847', 'tblTempVendorCDR_20' ) start [2025-03-03 03:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595847', 'tblTempVendorCDR_20' ) end [2025-03-03 03:55:17] Production.INFO: ProcessCDR(1,14595847,1,1,2) [2025-03-03 03:55:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595847,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:55:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595847,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:55:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595847,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:55:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595847,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:55:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595847', 'tblTempUsageDetail_20' ) start [2025-03-03 03:55:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595847', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:55:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:55:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:55:26] Production.INFO: ==6992== Releasing lock... [2025-03-03 03:55:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:55:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:56:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:56:17] Production.INFO: count ==409 [2025-03-03 03:56:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:56:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595852', 'tblTempUsageDetail_20' ) start [2025-03-03 03:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595852', 'tblTempUsageDetail_20' ) end [2025-03-03 03:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595852', 'tblTempVendorCDR_20' ) start [2025-03-03 03:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595852', 'tblTempVendorCDR_20' ) end [2025-03-03 03:56:17] Production.INFO: ProcessCDR(1,14595852,1,1,2) [2025-03-03 03:56:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595852,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:56:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595852,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:56:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595852,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:56:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595852,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:56:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595852', 'tblTempUsageDetail_20' ) start [2025-03-03 03:56:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595852', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:56:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:56:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:56:25] Production.INFO: ==7072== Releasing lock... [2025-03-03 03:56:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:56:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:57:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:57:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:57:16] Production.INFO: count ==409 [2025-03-03 03:57:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:57:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595857', 'tblTempUsageDetail_20' ) start [2025-03-03 03:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595857', 'tblTempUsageDetail_20' ) end [2025-03-03 03:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595857', 'tblTempVendorCDR_20' ) start [2025-03-03 03:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595857', 'tblTempVendorCDR_20' ) end [2025-03-03 03:57:17] Production.INFO: ProcessCDR(1,14595857,1,1,2) [2025-03-03 03:57:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595857,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:57:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595857,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:57:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595857,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:57:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595857,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:57:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595857', 'tblTempUsageDetail_20' ) start [2025-03-03 03:57:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595857', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:57:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:57:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:57:25] Production.INFO: ==7151== Releasing lock... [2025-03-03 03:57:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:57:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:58:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:58:17] Production.INFO: count ==409 [2025-03-03 03:58:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:58:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595862', 'tblTempUsageDetail_20' ) start [2025-03-03 03:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595862', 'tblTempUsageDetail_20' ) end [2025-03-03 03:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595862', 'tblTempVendorCDR_20' ) start [2025-03-03 03:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595862', 'tblTempVendorCDR_20' ) end [2025-03-03 03:58:17] Production.INFO: ProcessCDR(1,14595862,1,1,2) [2025-03-03 03:58:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595862,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:58:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595862,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:58:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595862,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:58:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595862,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:58:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595862', 'tblTempUsageDetail_20' ) start [2025-03-03 03:58:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595862', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:58:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:58:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:58:25] Production.INFO: ==7261== Releasing lock... [2025-03-03 03:58:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:58:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 03:59:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 03:59:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 03:59:16] Production.INFO: count ==409 [2025-03-03 03:59:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 03:59:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 03:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595867', 'tblTempUsageDetail_20' ) start [2025-03-03 03:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595867', 'tblTempUsageDetail_20' ) end [2025-03-03 03:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595867', 'tblTempVendorCDR_20' ) start [2025-03-03 03:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595867', 'tblTempVendorCDR_20' ) end [2025-03-03 03:59:16] Production.INFO: ProcessCDR(1,14595867,1,1,2) [2025-03-03 03:59:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595867,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:59:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595867,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 03:59:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595867,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:59:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595867,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 03:59:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595867', 'tblTempUsageDetail_20' ) start [2025-03-03 03:59:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595867', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 03:59:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 03:59:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 03:59:24] Production.INFO: ==7331== Releasing lock... [2025-03-03 03:59:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 03:59:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:00:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:00:17] Production.INFO: count ==409 [2025-03-03 04:00:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:00:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595873', 'tblTempUsageDetail_20' ) start [2025-03-03 04:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595873', 'tblTempUsageDetail_20' ) end [2025-03-03 04:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595873', 'tblTempVendorCDR_20' ) start [2025-03-03 04:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595873', 'tblTempVendorCDR_20' ) end [2025-03-03 04:00:18] Production.INFO: ProcessCDR(1,14595873,1,1,2) [2025-03-03 04:00:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595873,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:00:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595873,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:00:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595873,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:00:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595873,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:00:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595873', 'tblTempUsageDetail_20' ) start [2025-03-03 04:00:27] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595873', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:00:28] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:00:28] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:00:28] Production.INFO: ==7405== Releasing lock... [2025-03-03 04:00:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:00:28] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:01:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:01:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:01:16] Production.INFO: count ==409 [2025-03-03 04:01:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:01:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595879', 'tblTempUsageDetail_20' ) start [2025-03-03 04:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595879', 'tblTempUsageDetail_20' ) end [2025-03-03 04:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595879', 'tblTempVendorCDR_20' ) start [2025-03-03 04:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595879', 'tblTempVendorCDR_20' ) end [2025-03-03 04:01:16] Production.INFO: ProcessCDR(1,14595879,1,1,2) [2025-03-03 04:01:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595879,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:01:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595879,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:01:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595879,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:01:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595879,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:01:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595879', 'tblTempUsageDetail_20' ) start [2025-03-03 04:01:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595879', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:01:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:01:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:01:25] Production.INFO: ==7490== Releasing lock... [2025-03-03 04:01:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:01:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:02:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:02:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:02:17] Production.INFO: count ==409 [2025-03-03 04:02:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:02:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595884', 'tblTempUsageDetail_20' ) start [2025-03-03 04:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595884', 'tblTempUsageDetail_20' ) end [2025-03-03 04:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595884', 'tblTempVendorCDR_20' ) start [2025-03-03 04:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595884', 'tblTempVendorCDR_20' ) end [2025-03-03 04:02:17] Production.INFO: ProcessCDR(1,14595884,1,1,2) [2025-03-03 04:02:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595884,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:02:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595884,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:02:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595884,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:02:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595884,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:02:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595884', 'tblTempUsageDetail_20' ) start [2025-03-03 04:02:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595884', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:02:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:02:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:02:25] Production.INFO: ==7561== Releasing lock... [2025-03-03 04:02:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:02:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:03:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:03:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:03:16] Production.INFO: count ==409 [2025-03-03 04:03:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:03:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:03:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595889', 'tblTempUsageDetail_20' ) start [2025-03-03 04:03:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595889', 'tblTempUsageDetail_20' ) end [2025-03-03 04:03:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595889', 'tblTempVendorCDR_20' ) start [2025-03-03 04:03:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595889', 'tblTempVendorCDR_20' ) end [2025-03-03 04:03:16] Production.INFO: ProcessCDR(1,14595889,1,1,2) [2025-03-03 04:03:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595889,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:03:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595889,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:03:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595889,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:03:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595889,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:03:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595889', 'tblTempUsageDetail_20' ) start [2025-03-03 04:03:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595889', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:03:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:03:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:03:24] Production.INFO: ==7633== Releasing lock... [2025-03-03 04:03:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:03:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:04:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:04:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:04:17] Production.INFO: count ==409 [2025-03-03 04:04:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:04:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595894', 'tblTempUsageDetail_20' ) start [2025-03-03 04:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595894', 'tblTempUsageDetail_20' ) end [2025-03-03 04:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595894', 'tblTempVendorCDR_20' ) start [2025-03-03 04:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595894', 'tblTempVendorCDR_20' ) end [2025-03-03 04:04:17] Production.INFO: ProcessCDR(1,14595894,1,1,2) [2025-03-03 04:04:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595894,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:04:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595894,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:04:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595894,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:04:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595894,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:04:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595894', 'tblTempUsageDetail_20' ) start [2025-03-03 04:04:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595894', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:04:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:04:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:04:25] Production.INFO: ==7704== Releasing lock... [2025-03-03 04:04:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:04:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:05:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:05:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:05:16] Production.INFO: count ==409 [2025-03-03 04:05:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:05:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595899', 'tblTempUsageDetail_20' ) start [2025-03-03 04:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595899', 'tblTempUsageDetail_20' ) end [2025-03-03 04:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595899', 'tblTempVendorCDR_20' ) start [2025-03-03 04:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595899', 'tblTempVendorCDR_20' ) end [2025-03-03 04:05:16] Production.INFO: ProcessCDR(1,14595899,1,1,2) [2025-03-03 04:05:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595899,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:05:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595899,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:05:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595899,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:05:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595899,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:05:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595899', 'tblTempUsageDetail_20' ) start [2025-03-03 04:05:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595899', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:05:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:05:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:05:24] Production.INFO: ==7774== Releasing lock... [2025-03-03 04:05:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:05:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:06:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:06:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:06:16] Production.INFO: count ==409 [2025-03-03 04:06:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:06:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595904', 'tblTempUsageDetail_20' ) start [2025-03-03 04:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595904', 'tblTempUsageDetail_20' ) end [2025-03-03 04:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595904', 'tblTempVendorCDR_20' ) start [2025-03-03 04:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595904', 'tblTempVendorCDR_20' ) end [2025-03-03 04:06:16] Production.INFO: ProcessCDR(1,14595904,1,1,2) [2025-03-03 04:06:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595904,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:06:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595904,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:06:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595904,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:06:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595904,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:06:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595904', 'tblTempUsageDetail_20' ) start [2025-03-03 04:06:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595904', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:06:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:06:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:06:24] Production.INFO: ==7844== Releasing lock... [2025-03-03 04:06:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:06:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:07:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:07:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:07:16] Production.INFO: count ==409 [2025-03-03 04:07:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:07:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595909', 'tblTempUsageDetail_20' ) start [2025-03-03 04:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595909', 'tblTempUsageDetail_20' ) end [2025-03-03 04:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595909', 'tblTempVendorCDR_20' ) start [2025-03-03 04:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595909', 'tblTempVendorCDR_20' ) end [2025-03-03 04:07:17] Production.INFO: ProcessCDR(1,14595909,1,1,2) [2025-03-03 04:07:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595909,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:07:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595909,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:07:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595909,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:07:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595909,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:07:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595909', 'tblTempUsageDetail_20' ) start [2025-03-03 04:07:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595909', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:07:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:07:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:07:25] Production.INFO: ==7922== Releasing lock... [2025-03-03 04:07:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:07:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:08:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:08:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:08:16] Production.INFO: count ==409 [2025-03-03 04:08:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:08:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595914', 'tblTempUsageDetail_20' ) start [2025-03-03 04:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595914', 'tblTempUsageDetail_20' ) end [2025-03-03 04:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595914', 'tblTempVendorCDR_20' ) start [2025-03-03 04:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595914', 'tblTempVendorCDR_20' ) end [2025-03-03 04:08:16] Production.INFO: ProcessCDR(1,14595914,1,1,2) [2025-03-03 04:08:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595914,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:08:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595914,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:08:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595914,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:08:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595914,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:08:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595914', 'tblTempUsageDetail_20' ) start [2025-03-03 04:08:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595914', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:08:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:08:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:08:24] Production.INFO: ==7995== Releasing lock... [2025-03-03 04:08:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:08:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:09:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:09:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:09:16] Production.INFO: count ==409 [2025-03-03 04:09:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:09:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595919', 'tblTempUsageDetail_20' ) start [2025-03-03 04:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595919', 'tblTempUsageDetail_20' ) end [2025-03-03 04:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595919', 'tblTempVendorCDR_20' ) start [2025-03-03 04:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595919', 'tblTempVendorCDR_20' ) end [2025-03-03 04:09:16] Production.INFO: ProcessCDR(1,14595919,1,1,2) [2025-03-03 04:09:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595919,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:09:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595919,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:09:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595919,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:09:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595919,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:09:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595919', 'tblTempUsageDetail_20' ) start [2025-03-03 04:09:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595919', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:09:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:09:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:09:24] Production.INFO: ==8065== Releasing lock... [2025-03-03 04:09:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:09:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:10:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:10:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:10:17] Production.INFO: count ==409 [2025-03-03 04:10:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:10:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595925', 'tblTempUsageDetail_20' ) start [2025-03-03 04:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595925', 'tblTempUsageDetail_20' ) end [2025-03-03 04:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595925', 'tblTempVendorCDR_20' ) start [2025-03-03 04:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595925', 'tblTempVendorCDR_20' ) end [2025-03-03 04:10:17] Production.INFO: ProcessCDR(1,14595925,1,1,2) [2025-03-03 04:10:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595925,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:10:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595925,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:10:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595925,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:10:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595925,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:10:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595925', 'tblTempUsageDetail_20' ) start [2025-03-03 04:10:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595925', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:10:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:10:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:10:25] Production.INFO: ==8139== Releasing lock... [2025-03-03 04:10:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:10:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:11:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:11:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:11:16] Production.INFO: count ==409 [2025-03-03 04:11:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:11:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:11:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595930', 'tblTempUsageDetail_20' ) start [2025-03-03 04:11:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595930', 'tblTempUsageDetail_20' ) end [2025-03-03 04:11:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595930', 'tblTempVendorCDR_20' ) start [2025-03-03 04:11:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595930', 'tblTempVendorCDR_20' ) end [2025-03-03 04:11:16] Production.INFO: ProcessCDR(1,14595930,1,1,2) [2025-03-03 04:11:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595930,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:11:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595930,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:11:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595930,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:11:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595930,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:11:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595930', 'tblTempUsageDetail_20' ) start [2025-03-03 04:11:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595930', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:11:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:11:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:11:24] Production.INFO: ==8213== Releasing lock... [2025-03-03 04:11:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:11:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:12:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:12:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:12:16] Production.INFO: count ==409 [2025-03-03 04:12:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:12:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595935', 'tblTempUsageDetail_20' ) start [2025-03-03 04:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595935', 'tblTempUsageDetail_20' ) end [2025-03-03 04:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595935', 'tblTempVendorCDR_20' ) start [2025-03-03 04:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595935', 'tblTempVendorCDR_20' ) end [2025-03-03 04:12:16] Production.INFO: ProcessCDR(1,14595935,1,1,2) [2025-03-03 04:12:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595935,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:12:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595935,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:12:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595935,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:12:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595935,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:12:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595935', 'tblTempUsageDetail_20' ) start [2025-03-03 04:12:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595935', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:12:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:12:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:12:24] Production.INFO: ==8284== Releasing lock... [2025-03-03 04:12:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:12:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:13:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:13:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:13:16] Production.INFO: count ==409 [2025-03-03 04:13:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:13:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:13:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595940', 'tblTempUsageDetail_20' ) start [2025-03-03 04:13:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595940', 'tblTempUsageDetail_20' ) end [2025-03-03 04:13:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595940', 'tblTempVendorCDR_20' ) start [2025-03-03 04:13:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595940', 'tblTempVendorCDR_20' ) end [2025-03-03 04:13:16] Production.INFO: ProcessCDR(1,14595940,1,1,2) [2025-03-03 04:13:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595940,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:13:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595940,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:13:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595940,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:13:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595940,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:13:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595940', 'tblTempUsageDetail_20' ) start [2025-03-03 04:13:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595940', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:13:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:13:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:13:23] Production.INFO: ==8354== Releasing lock... [2025-03-03 04:13:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:13:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:14:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:14:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:14:16] Production.INFO: count ==409 [2025-03-03 04:14:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:14:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595945', 'tblTempUsageDetail_20' ) start [2025-03-03 04:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595945', 'tblTempUsageDetail_20' ) end [2025-03-03 04:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595945', 'tblTempVendorCDR_20' ) start [2025-03-03 04:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595945', 'tblTempVendorCDR_20' ) end [2025-03-03 04:14:17] Production.INFO: ProcessCDR(1,14595945,1,1,2) [2025-03-03 04:14:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595945,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:14:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595945,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:14:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595945,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:14:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595945,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:14:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595945', 'tblTempUsageDetail_20' ) start [2025-03-03 04:14:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595945', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:14:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:14:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:14:25] Production.INFO: ==8463== Releasing lock... [2025-03-03 04:14:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:14:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:15:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:15:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:15:16] Production.INFO: count ==409 [2025-03-03 04:15:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:15:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595950', 'tblTempUsageDetail_20' ) start [2025-03-03 04:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595950', 'tblTempUsageDetail_20' ) end [2025-03-03 04:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595950', 'tblTempVendorCDR_20' ) start [2025-03-03 04:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595950', 'tblTempVendorCDR_20' ) end [2025-03-03 04:15:16] Production.INFO: ProcessCDR(1,14595950,1,1,2) [2025-03-03 04:15:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595950,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:15:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595950,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:15:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595950,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:15:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595950,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:15:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595950', 'tblTempUsageDetail_20' ) start [2025-03-03 04:15:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595950', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:15:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:15:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:15:24] Production.INFO: ==8536== Releasing lock... [2025-03-03 04:15:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:15:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:16:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:16:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:16:16] Production.INFO: count ==409 [2025-03-03 04:16:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:16:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595955', 'tblTempUsageDetail_20' ) start [2025-03-03 04:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595955', 'tblTempUsageDetail_20' ) end [2025-03-03 04:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595955', 'tblTempVendorCDR_20' ) start [2025-03-03 04:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595955', 'tblTempVendorCDR_20' ) end [2025-03-03 04:16:17] Production.INFO: ProcessCDR(1,14595955,1,1,2) [2025-03-03 04:16:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595955,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:16:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595955,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:16:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595955,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:16:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595955,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:16:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595955', 'tblTempUsageDetail_20' ) start [2025-03-03 04:16:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595955', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:16:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:16:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:16:25] Production.INFO: ==8613== Releasing lock... [2025-03-03 04:16:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:16:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:17:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:17:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:17:16] Production.INFO: count ==409 [2025-03-03 04:17:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:17:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595960', 'tblTempUsageDetail_20' ) start [2025-03-03 04:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595960', 'tblTempUsageDetail_20' ) end [2025-03-03 04:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595960', 'tblTempVendorCDR_20' ) start [2025-03-03 04:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595960', 'tblTempVendorCDR_20' ) end [2025-03-03 04:17:16] Production.INFO: ProcessCDR(1,14595960,1,1,2) [2025-03-03 04:17:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595960,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:17:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595960,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:17:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595960,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:17:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595960,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595960', 'tblTempUsageDetail_20' ) start [2025-03-03 04:17:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595960', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:17:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:17:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:17:23] Production.INFO: ==8684== Releasing lock... [2025-03-03 04:17:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:17:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:18:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:18:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:18:16] Production.INFO: count ==409 [2025-03-03 04:18:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:18:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595965', 'tblTempUsageDetail_20' ) start [2025-03-03 04:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595965', 'tblTempUsageDetail_20' ) end [2025-03-03 04:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595965', 'tblTempVendorCDR_20' ) start [2025-03-03 04:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595965', 'tblTempVendorCDR_20' ) end [2025-03-03 04:18:16] Production.INFO: ProcessCDR(1,14595965,1,1,2) [2025-03-03 04:18:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595965,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:18:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595965,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:18:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595965,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:18:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595965,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595965', 'tblTempUsageDetail_20' ) start [2025-03-03 04:18:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595965', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:18:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:18:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:18:24] Production.INFO: ==8766== Releasing lock... [2025-03-03 04:18:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:18:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:19:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:19:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:19:16] Production.INFO: count ==409 [2025-03-03 04:19:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:19:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595970', 'tblTempUsageDetail_20' ) start [2025-03-03 04:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595970', 'tblTempUsageDetail_20' ) end [2025-03-03 04:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595970', 'tblTempVendorCDR_20' ) start [2025-03-03 04:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595970', 'tblTempVendorCDR_20' ) end [2025-03-03 04:19:16] Production.INFO: ProcessCDR(1,14595970,1,1,2) [2025-03-03 04:19:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595970,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:19:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595970,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:19:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595970,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:19:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595970,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:19:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595970', 'tblTempUsageDetail_20' ) start [2025-03-03 04:19:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595970', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:19:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:19:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:19:24] Production.INFO: ==8839== Releasing lock... [2025-03-03 04:19:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:19:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:20:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:20:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:20:17] Production.INFO: count ==409 [2025-03-03 04:20:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:20:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595976', 'tblTempUsageDetail_20' ) start [2025-03-03 04:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595976', 'tblTempUsageDetail_20' ) end [2025-03-03 04:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595976', 'tblTempVendorCDR_20' ) start [2025-03-03 04:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595976', 'tblTempVendorCDR_20' ) end [2025-03-03 04:20:17] Production.INFO: ProcessCDR(1,14595976,1,1,2) [2025-03-03 04:20:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595976,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:20:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595976,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:20:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595976,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:20:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595976,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595976', 'tblTempUsageDetail_20' ) start [2025-03-03 04:20:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595976', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:20:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:20:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:20:25] Production.INFO: ==8914== Releasing lock... [2025-03-03 04:20:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:20:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:21:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:21:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:21:16] Production.INFO: count ==409 [2025-03-03 04:21:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:21:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595981', 'tblTempUsageDetail_20' ) start [2025-03-03 04:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595981', 'tblTempUsageDetail_20' ) end [2025-03-03 04:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595981', 'tblTempVendorCDR_20' ) start [2025-03-03 04:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595981', 'tblTempVendorCDR_20' ) end [2025-03-03 04:21:16] Production.INFO: ProcessCDR(1,14595981,1,1,2) [2025-03-03 04:21:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595981,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:21:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595981,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:21:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595981,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:21:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595981,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:21:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595981', 'tblTempUsageDetail_20' ) start [2025-03-03 04:21:22] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595981', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:21:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:21:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:21:23] Production.INFO: ==8991== Releasing lock... [2025-03-03 04:21:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:21:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:22:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:22:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:22:16] Production.INFO: count ==409 [2025-03-03 04:22:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:22:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595986', 'tblTempUsageDetail_20' ) start [2025-03-03 04:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595986', 'tblTempUsageDetail_20' ) end [2025-03-03 04:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595986', 'tblTempVendorCDR_20' ) start [2025-03-03 04:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595986', 'tblTempVendorCDR_20' ) end [2025-03-03 04:22:17] Production.INFO: ProcessCDR(1,14595986,1,1,2) [2025-03-03 04:22:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595986,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:22:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595986,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:22:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595986,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:22:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595986,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595986', 'tblTempUsageDetail_20' ) start [2025-03-03 04:22:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595986', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:22:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:22:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:22:24] Production.INFO: ==9065== Releasing lock... [2025-03-03 04:22:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:22:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:23:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:23:16] Production.INFO: count ==409 [2025-03-03 04:23:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:23:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595991', 'tblTempUsageDetail_20' ) start [2025-03-03 04:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595991', 'tblTempUsageDetail_20' ) end [2025-03-03 04:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595991', 'tblTempVendorCDR_20' ) start [2025-03-03 04:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595991', 'tblTempVendorCDR_20' ) end [2025-03-03 04:23:17] Production.INFO: ProcessCDR(1,14595991,1,1,2) [2025-03-03 04:23:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595991,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:23:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595991,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:23:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595991,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:23:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595991,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:23:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595991', 'tblTempUsageDetail_20' ) start [2025-03-03 04:23:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595991', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:23:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:23:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:23:24] Production.INFO: ==9137== Releasing lock... [2025-03-03 04:23:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:23:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:24:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:24:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:24:16] Production.INFO: count ==409 [2025-03-03 04:24:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:24:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:24:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595996', 'tblTempUsageDetail_20' ) start [2025-03-03 04:24:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14595996', 'tblTempUsageDetail_20' ) end [2025-03-03 04:24:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595996', 'tblTempVendorCDR_20' ) start [2025-03-03 04:24:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14595996', 'tblTempVendorCDR_20' ) end [2025-03-03 04:24:16] Production.INFO: ProcessCDR(1,14595996,1,1,2) [2025-03-03 04:24:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14595996,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:24:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14595996,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:24:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14595996,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:24:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14595996,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14595996', 'tblTempUsageDetail_20' ) start [2025-03-03 04:24:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14595996', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:24:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:24:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:24:24] Production.INFO: ==9211== Releasing lock... [2025-03-03 04:24:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:24:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:25:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:25:17] Production.INFO: count ==409 [2025-03-03 04:25:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:25:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596001', 'tblTempUsageDetail_20' ) start [2025-03-03 04:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596001', 'tblTempUsageDetail_20' ) end [2025-03-03 04:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596001', 'tblTempVendorCDR_20' ) start [2025-03-03 04:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596001', 'tblTempVendorCDR_20' ) end [2025-03-03 04:25:17] Production.INFO: ProcessCDR(1,14596001,1,1,2) [2025-03-03 04:25:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596001,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:25:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596001,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:25:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596001,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:25:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596001,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:25:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596001', 'tblTempUsageDetail_20' ) start [2025-03-03 04:25:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596001', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:25:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:25:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:25:25] Production.INFO: ==9282== Releasing lock... [2025-03-03 04:25:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:25:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:26:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:26:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:26:16] Production.INFO: count ==409 [2025-03-03 04:26:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:26:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:26:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596006', 'tblTempUsageDetail_20' ) start [2025-03-03 04:26:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596006', 'tblTempUsageDetail_20' ) end [2025-03-03 04:26:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596006', 'tblTempVendorCDR_20' ) start [2025-03-03 04:26:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596006', 'tblTempVendorCDR_20' ) end [2025-03-03 04:26:16] Production.INFO: ProcessCDR(1,14596006,1,1,2) [2025-03-03 04:26:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596006,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:26:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596006,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:26:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596006,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:26:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596006,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:26:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596006', 'tblTempUsageDetail_20' ) start [2025-03-03 04:26:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596006', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:26:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:26:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:26:24] Production.INFO: ==9352== Releasing lock... [2025-03-03 04:26:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:26:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:27:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:27:17] Production.INFO: count ==409 [2025-03-03 04:27:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:27:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596011', 'tblTempUsageDetail_20' ) start [2025-03-03 04:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596011', 'tblTempUsageDetail_20' ) end [2025-03-03 04:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596011', 'tblTempVendorCDR_20' ) start [2025-03-03 04:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596011', 'tblTempVendorCDR_20' ) end [2025-03-03 04:27:17] Production.INFO: ProcessCDR(1,14596011,1,1,2) [2025-03-03 04:27:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596011,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:27:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596011,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:27:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596011,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:27:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596011,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:27:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596011', 'tblTempUsageDetail_20' ) start [2025-03-03 04:27:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596011', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:27:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:27:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:27:24] Production.INFO: ==9425== Releasing lock... [2025-03-03 04:27:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:27:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:28:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:28:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:28:16] Production.INFO: count ==409 [2025-03-03 04:28:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:28:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:28:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596016', 'tblTempUsageDetail_20' ) start [2025-03-03 04:28:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596016', 'tblTempUsageDetail_20' ) end [2025-03-03 04:28:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596016', 'tblTempVendorCDR_20' ) start [2025-03-03 04:28:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596016', 'tblTempVendorCDR_20' ) end [2025-03-03 04:28:16] Production.INFO: ProcessCDR(1,14596016,1,1,2) [2025-03-03 04:28:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596016,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:28:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596016,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:28:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596016,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:28:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596016,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:28:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596016', 'tblTempUsageDetail_20' ) start [2025-03-03 04:28:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596016', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:28:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:28:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:28:24] Production.INFO: ==9496== Releasing lock... [2025-03-03 04:28:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:28:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:29:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:29:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:29:16] Production.INFO: count ==409 [2025-03-03 04:29:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:29:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596021', 'tblTempUsageDetail_20' ) start [2025-03-03 04:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596021', 'tblTempUsageDetail_20' ) end [2025-03-03 04:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596021', 'tblTempVendorCDR_20' ) start [2025-03-03 04:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596021', 'tblTempVendorCDR_20' ) end [2025-03-03 04:29:16] Production.INFO: ProcessCDR(1,14596021,1,1,2) [2025-03-03 04:29:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596021,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:29:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596021,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:29:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596021,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:29:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596021,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:29:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596021', 'tblTempUsageDetail_20' ) start [2025-03-03 04:29:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596021', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:29:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:29:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:29:24] Production.INFO: ==9611== Releasing lock... [2025-03-03 04:29:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:29:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:30:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:30:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:30:17] Production.INFO: count ==409 [2025-03-03 04:30:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:30:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596027', 'tblTempUsageDetail_20' ) start [2025-03-03 04:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596027', 'tblTempUsageDetail_20' ) end [2025-03-03 04:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596027', 'tblTempVendorCDR_20' ) start [2025-03-03 04:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596027', 'tblTempVendorCDR_20' ) end [2025-03-03 04:30:17] Production.INFO: ProcessCDR(1,14596027,1,1,2) [2025-03-03 04:30:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596027,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:30:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596027,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:30:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596027,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:30:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596027,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:30:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596027', 'tblTempUsageDetail_20' ) start [2025-03-03 04:30:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596027', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:30:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:30:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:30:25] Production.INFO: ==9684== Releasing lock... [2025-03-03 04:30:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:30:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:31:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:31:17] Production.INFO: count ==409 [2025-03-03 04:31:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:31:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596033', 'tblTempUsageDetail_20' ) start [2025-03-03 04:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596033', 'tblTempUsageDetail_20' ) end [2025-03-03 04:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596033', 'tblTempVendorCDR_20' ) start [2025-03-03 04:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596033', 'tblTempVendorCDR_20' ) end [2025-03-03 04:31:17] Production.INFO: ProcessCDR(1,14596033,1,1,2) [2025-03-03 04:31:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596033,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:31:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596033,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:31:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596033,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:31:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596033,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:31:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596033', 'tblTempUsageDetail_20' ) start [2025-03-03 04:31:27] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596033', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:31:28] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:31:28] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:31:28] Production.INFO: ==9761== Releasing lock... [2025-03-03 04:31:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:31:28] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:32:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:32:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:32:16] Production.INFO: count ==409 [2025-03-03 04:32:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:32:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596038', 'tblTempUsageDetail_20' ) start [2025-03-03 04:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596038', 'tblTempUsageDetail_20' ) end [2025-03-03 04:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596038', 'tblTempVendorCDR_20' ) start [2025-03-03 04:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596038', 'tblTempVendorCDR_20' ) end [2025-03-03 04:32:16] Production.INFO: ProcessCDR(1,14596038,1,1,2) [2025-03-03 04:32:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596038,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:32:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596038,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:32:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596038,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:32:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596038,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:32:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596038', 'tblTempUsageDetail_20' ) start [2025-03-03 04:32:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596038', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:32:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:32:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:32:24] Production.INFO: ==9894== Releasing lock... [2025-03-03 04:32:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:32:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:33:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:33:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:33:16] Production.INFO: count ==409 [2025-03-03 04:33:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:33:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596043', 'tblTempUsageDetail_20' ) start [2025-03-03 04:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596043', 'tblTempUsageDetail_20' ) end [2025-03-03 04:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596043', 'tblTempVendorCDR_20' ) start [2025-03-03 04:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596043', 'tblTempVendorCDR_20' ) end [2025-03-03 04:33:16] Production.INFO: ProcessCDR(1,14596043,1,1,2) [2025-03-03 04:33:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596043,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:33:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596043,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:33:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596043,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:33:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596043,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:33:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596043', 'tblTempUsageDetail_20' ) start [2025-03-03 04:33:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596043', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:33:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:33:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:33:24] Production.INFO: ==9972== Releasing lock... [2025-03-03 04:33:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:33:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:34:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:34:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:34:15] Production.INFO: count ==409 [2025-03-03 04:34:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:34:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596048', 'tblTempUsageDetail_20' ) start [2025-03-03 04:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596048', 'tblTempUsageDetail_20' ) end [2025-03-03 04:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596048', 'tblTempVendorCDR_20' ) start [2025-03-03 04:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596048', 'tblTempVendorCDR_20' ) end [2025-03-03 04:34:16] Production.INFO: ProcessCDR(1,14596048,1,1,2) [2025-03-03 04:34:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596048,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:34:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596048,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:34:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596048,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:34:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596048,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:34:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596048', 'tblTempUsageDetail_20' ) start [2025-03-03 04:34:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596048', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:34:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:34:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:34:23] Production.INFO: ==10045== Releasing lock... [2025-03-03 04:34:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:34:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:35:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:35:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:35:16] Production.INFO: count ==409 [2025-03-03 04:35:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:35:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:35:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596053', 'tblTempUsageDetail_20' ) start [2025-03-03 04:35:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596053', 'tblTempUsageDetail_20' ) end [2025-03-03 04:35:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596053', 'tblTempVendorCDR_20' ) start [2025-03-03 04:35:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596053', 'tblTempVendorCDR_20' ) end [2025-03-03 04:35:16] Production.INFO: ProcessCDR(1,14596053,1,1,2) [2025-03-03 04:35:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596053,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:35:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596053,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:35:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596053,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:35:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596053,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:35:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596053', 'tblTempUsageDetail_20' ) start [2025-03-03 04:35:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596053', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:35:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:35:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:35:24] Production.INFO: ==10117== Releasing lock... [2025-03-03 04:35:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:35:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:36:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:36:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:36:16] Production.INFO: count ==409 [2025-03-03 04:36:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:36:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596058', 'tblTempUsageDetail_20' ) start [2025-03-03 04:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596058', 'tblTempUsageDetail_20' ) end [2025-03-03 04:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596058', 'tblTempVendorCDR_20' ) start [2025-03-03 04:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596058', 'tblTempVendorCDR_20' ) end [2025-03-03 04:36:16] Production.INFO: ProcessCDR(1,14596058,1,1,2) [2025-03-03 04:36:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596058,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:36:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596058,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:36:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596058,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:36:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596058,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:36:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596058', 'tblTempUsageDetail_20' ) start [2025-03-03 04:36:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596058', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:36:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:36:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:36:24] Production.INFO: ==10194== Releasing lock... [2025-03-03 04:36:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:36:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:37:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:37:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:37:16] Production.INFO: count ==409 [2025-03-03 04:37:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:37:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:37:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596063', 'tblTempUsageDetail_20' ) start [2025-03-03 04:37:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596063', 'tblTempUsageDetail_20' ) end [2025-03-03 04:37:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596063', 'tblTempVendorCDR_20' ) start [2025-03-03 04:37:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596063', 'tblTempVendorCDR_20' ) end [2025-03-03 04:37:16] Production.INFO: ProcessCDR(1,14596063,1,1,2) [2025-03-03 04:37:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596063,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:37:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596063,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:37:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596063,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:37:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596063,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596063', 'tblTempUsageDetail_20' ) start [2025-03-03 04:37:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596063', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:37:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:37:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:37:24] Production.INFO: ==10266== Releasing lock... [2025-03-03 04:37:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:37:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:38:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:38:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:38:15] Production.INFO: count ==409 [2025-03-03 04:38:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:38:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596068', 'tblTempUsageDetail_20' ) start [2025-03-03 04:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596068', 'tblTempUsageDetail_20' ) end [2025-03-03 04:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596068', 'tblTempVendorCDR_20' ) start [2025-03-03 04:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596068', 'tblTempVendorCDR_20' ) end [2025-03-03 04:38:16] Production.INFO: ProcessCDR(1,14596068,1,1,2) [2025-03-03 04:38:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596068,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:38:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596068,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:38:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596068,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:38:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596068,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596068', 'tblTempUsageDetail_20' ) start [2025-03-03 04:38:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596068', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:38:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:38:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:38:24] Production.INFO: ==10336== Releasing lock... [2025-03-03 04:38:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:38:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:39:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:39:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:39:16] Production.INFO: count ==409 [2025-03-03 04:39:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:39:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596073', 'tblTempUsageDetail_20' ) start [2025-03-03 04:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596073', 'tblTempUsageDetail_20' ) end [2025-03-03 04:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596073', 'tblTempVendorCDR_20' ) start [2025-03-03 04:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596073', 'tblTempVendorCDR_20' ) end [2025-03-03 04:39:16] Production.INFO: ProcessCDR(1,14596073,1,1,2) [2025-03-03 04:39:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596073,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:39:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596073,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:39:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596073,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:39:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596073,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:39:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596073', 'tblTempUsageDetail_20' ) start [2025-03-03 04:39:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596073', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:39:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:39:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:39:24] Production.INFO: ==10411== Releasing lock... [2025-03-03 04:39:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:39:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:40:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:40:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:40:17] Production.INFO: count ==409 [2025-03-03 04:40:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:40:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596079', 'tblTempUsageDetail_20' ) start [2025-03-03 04:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596079', 'tblTempUsageDetail_20' ) end [2025-03-03 04:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596079', 'tblTempVendorCDR_20' ) start [2025-03-03 04:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596079', 'tblTempVendorCDR_20' ) end [2025-03-03 04:40:17] Production.INFO: ProcessCDR(1,14596079,1,1,2) [2025-03-03 04:40:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596079,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:40:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596079,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:40:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596079,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:40:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596079,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:40:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596079', 'tblTempUsageDetail_20' ) start [2025-03-03 04:40:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596079', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:40:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:40:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:40:25] Production.INFO: ==10483== Releasing lock... [2025-03-03 04:40:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:40:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:41:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:41:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:41:16] Production.INFO: count ==409 [2025-03-03 04:41:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:41:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596084', 'tblTempUsageDetail_20' ) start [2025-03-03 04:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596084', 'tblTempUsageDetail_20' ) end [2025-03-03 04:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596084', 'tblTempVendorCDR_20' ) start [2025-03-03 04:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596084', 'tblTempVendorCDR_20' ) end [2025-03-03 04:41:16] Production.INFO: ProcessCDR(1,14596084,1,1,2) [2025-03-03 04:41:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596084,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:41:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596084,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:41:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596084,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:41:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596084,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:41:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596084', 'tblTempUsageDetail_20' ) start [2025-03-03 04:41:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596084', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:41:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:41:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:41:24] Production.INFO: ==10560== Releasing lock... [2025-03-03 04:41:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:41:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:42:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:42:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:42:16] Production.INFO: count ==409 [2025-03-03 04:42:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:42:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596089', 'tblTempUsageDetail_20' ) start [2025-03-03 04:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596089', 'tblTempUsageDetail_20' ) end [2025-03-03 04:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596089', 'tblTempVendorCDR_20' ) start [2025-03-03 04:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596089', 'tblTempVendorCDR_20' ) end [2025-03-03 04:42:16] Production.INFO: ProcessCDR(1,14596089,1,1,2) [2025-03-03 04:42:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596089,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:42:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596089,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:42:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596089,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:42:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596089,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:42:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596089', 'tblTempUsageDetail_20' ) start [2025-03-03 04:42:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596089', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:42:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:42:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:42:24] Production.INFO: ==10631== Releasing lock... [2025-03-03 04:42:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:42:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:43:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:43:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:43:16] Production.INFO: count ==409 [2025-03-03 04:43:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:43:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:43:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596094', 'tblTempUsageDetail_20' ) start [2025-03-03 04:43:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596094', 'tblTempUsageDetail_20' ) end [2025-03-03 04:43:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596094', 'tblTempVendorCDR_20' ) start [2025-03-03 04:43:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596094', 'tblTempVendorCDR_20' ) end [2025-03-03 04:43:16] Production.INFO: ProcessCDR(1,14596094,1,1,2) [2025-03-03 04:43:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596094,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:43:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596094,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:43:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596094,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:43:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596094,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:43:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596094', 'tblTempUsageDetail_20' ) start [2025-03-03 04:43:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596094', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:43:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:43:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:43:24] Production.INFO: ==10701== Releasing lock... [2025-03-03 04:43:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:43:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:44:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:44:17] Production.INFO: count ==409 [2025-03-03 04:44:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:44:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596099', 'tblTempUsageDetail_20' ) start [2025-03-03 04:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596099', 'tblTempUsageDetail_20' ) end [2025-03-03 04:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596099', 'tblTempVendorCDR_20' ) start [2025-03-03 04:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596099', 'tblTempVendorCDR_20' ) end [2025-03-03 04:44:17] Production.INFO: ProcessCDR(1,14596099,1,1,2) [2025-03-03 04:44:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596099,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:44:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596099,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:44:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596099,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:44:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596099,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:44:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596099', 'tblTempUsageDetail_20' ) start [2025-03-03 04:44:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596099', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:44:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:44:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:44:25] Production.INFO: ==10773== Releasing lock... [2025-03-03 04:44:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:44:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:45:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:45:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:45:16] Production.INFO: count ==409 [2025-03-03 04:45:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:45:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596104', 'tblTempUsageDetail_20' ) start [2025-03-03 04:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596104', 'tblTempUsageDetail_20' ) end [2025-03-03 04:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596104', 'tblTempVendorCDR_20' ) start [2025-03-03 04:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596104', 'tblTempVendorCDR_20' ) end [2025-03-03 04:45:17] Production.INFO: ProcessCDR(1,14596104,1,1,2) [2025-03-03 04:45:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596104,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:45:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596104,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:45:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596104,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:45:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596104,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:45:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596104', 'tblTempUsageDetail_20' ) start [2025-03-03 04:45:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596104', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:45:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:45:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:45:24] Production.INFO: ==10885== Releasing lock... [2025-03-03 04:45:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:45:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:46:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:46:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:46:16] Production.INFO: count ==409 [2025-03-03 04:46:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:46:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596109', 'tblTempUsageDetail_20' ) start [2025-03-03 04:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596109', 'tblTempUsageDetail_20' ) end [2025-03-03 04:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596109', 'tblTempVendorCDR_20' ) start [2025-03-03 04:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596109', 'tblTempVendorCDR_20' ) end [2025-03-03 04:46:17] Production.INFO: ProcessCDR(1,14596109,1,1,2) [2025-03-03 04:46:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596109,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:46:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596109,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:46:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596109,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:46:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596109,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596109', 'tblTempUsageDetail_20' ) start [2025-03-03 04:46:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596109', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:46:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:46:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:46:24] Production.INFO: ==10957== Releasing lock... [2025-03-03 04:46:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:46:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:47:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:47:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:47:19] Production.INFO: count ==409 [2025-03-03 04:47:19] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:47:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:47:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596114', 'tblTempUsageDetail_20' ) start [2025-03-03 04:47:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596114', 'tblTempUsageDetail_20' ) end [2025-03-03 04:47:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596114', 'tblTempVendorCDR_20' ) start [2025-03-03 04:47:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596114', 'tblTempVendorCDR_20' ) end [2025-03-03 04:47:19] Production.INFO: ProcessCDR(1,14596114,1,1,2) [2025-03-03 04:47:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596114,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:47:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596114,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:47:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596114,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:47:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596114,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:47:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596114', 'tblTempUsageDetail_20' ) start [2025-03-03 04:47:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596114', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:47:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:47:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:47:26] Production.INFO: ==11034== Releasing lock... [2025-03-03 04:47:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:47:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:48:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:48:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:48:16] Production.INFO: count ==409 [2025-03-03 04:48:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:48:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596119', 'tblTempUsageDetail_20' ) start [2025-03-03 04:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596119', 'tblTempUsageDetail_20' ) end [2025-03-03 04:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596119', 'tblTempVendorCDR_20' ) start [2025-03-03 04:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596119', 'tblTempVendorCDR_20' ) end [2025-03-03 04:48:17] Production.INFO: ProcessCDR(1,14596119,1,1,2) [2025-03-03 04:48:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596119,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:48:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596119,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:48:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596119,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:48:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596119,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:48:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596119', 'tblTempUsageDetail_20' ) start [2025-03-03 04:48:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596119', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:48:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:48:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:48:25] Production.INFO: ==11105== Releasing lock... [2025-03-03 04:48:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:48:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:49:03] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:49:03] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:49:15] Production.INFO: count ==409 [2025-03-03 04:49:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:49:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596120', 'tblTempUsageDetail_20' ) start [2025-03-03 04:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596120', 'tblTempUsageDetail_20' ) end [2025-03-03 04:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596120', 'tblTempVendorCDR_20' ) start [2025-03-03 04:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596120', 'tblTempVendorCDR_20' ) end [2025-03-03 04:49:16] Production.INFO: ProcessCDR(1,14596120,1,1,2) [2025-03-03 04:49:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596120,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:49:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596120,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:49:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596120,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:49:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596120,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:49:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596120', 'tblTempUsageDetail_20' ) start [2025-03-03 04:49:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596120', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:49:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:49:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:49:23] Production.INFO: ==11178== Releasing lock... [2025-03-03 04:49:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:49:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:50:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:50:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:50:17] Production.INFO: count ==409 [2025-03-03 04:50:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:50:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596130', 'tblTempUsageDetail_20' ) start [2025-03-03 04:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596130', 'tblTempUsageDetail_20' ) end [2025-03-03 04:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596130', 'tblTempVendorCDR_20' ) start [2025-03-03 04:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596130', 'tblTempVendorCDR_20' ) end [2025-03-03 04:50:18] Production.INFO: ProcessCDR(1,14596130,1,1,2) [2025-03-03 04:50:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596130,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:50:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596130,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:50:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596130,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:50:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596130,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:50:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596130', 'tblTempUsageDetail_20' ) start [2025-03-03 04:50:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596130', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:50:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:50:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:50:26] Production.INFO: ==11250== Releasing lock... [2025-03-03 04:50:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:50:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:51:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:51:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:51:16] Production.INFO: count ==409 [2025-03-03 04:51:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:51:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596135', 'tblTempUsageDetail_20' ) start [2025-03-03 04:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596135', 'tblTempUsageDetail_20' ) end [2025-03-03 04:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596135', 'tblTempVendorCDR_20' ) start [2025-03-03 04:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596135', 'tblTempVendorCDR_20' ) end [2025-03-03 04:51:16] Production.INFO: ProcessCDR(1,14596135,1,1,2) [2025-03-03 04:51:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596135,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:51:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596135,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:51:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596135,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:51:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596135,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:51:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596135', 'tblTempUsageDetail_20' ) start [2025-03-03 04:51:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596135', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:51:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:51:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:51:24] Production.INFO: ==11326== Releasing lock... [2025-03-03 04:51:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:51:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:52:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:52:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:52:17] Production.INFO: count ==409 [2025-03-03 04:52:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:52:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596140', 'tblTempUsageDetail_20' ) start [2025-03-03 04:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596140', 'tblTempUsageDetail_20' ) end [2025-03-03 04:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596140', 'tblTempVendorCDR_20' ) start [2025-03-03 04:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596140', 'tblTempVendorCDR_20' ) end [2025-03-03 04:52:18] Production.INFO: ProcessCDR(1,14596140,1,1,2) [2025-03-03 04:52:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596140,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:52:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596140,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:52:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596140,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:52:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596140,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:52:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596140', 'tblTempUsageDetail_20' ) start [2025-03-03 04:52:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596140', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:52:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:52:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:52:26] Production.INFO: ==11397== Releasing lock... [2025-03-03 04:52:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:52:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:53:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:53:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:53:16] Production.INFO: count ==409 [2025-03-03 04:53:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:53:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596145', 'tblTempUsageDetail_20' ) start [2025-03-03 04:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596145', 'tblTempUsageDetail_20' ) end [2025-03-03 04:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596145', 'tblTempVendorCDR_20' ) start [2025-03-03 04:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596145', 'tblTempVendorCDR_20' ) end [2025-03-03 04:53:16] Production.INFO: ProcessCDR(1,14596145,1,1,2) [2025-03-03 04:53:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596145,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:53:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596145,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:53:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596145,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:53:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596145,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596145', 'tblTempUsageDetail_20' ) start [2025-03-03 04:53:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596145', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:53:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:53:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:53:24] Production.INFO: ==11470== Releasing lock... [2025-03-03 04:53:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:53:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:54:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:54:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:54:16] Production.INFO: count ==409 [2025-03-03 04:54:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:54:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:54:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596150', 'tblTempUsageDetail_20' ) start [2025-03-03 04:54:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596150', 'tblTempUsageDetail_20' ) end [2025-03-03 04:54:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596150', 'tblTempVendorCDR_20' ) start [2025-03-03 04:54:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596150', 'tblTempVendorCDR_20' ) end [2025-03-03 04:54:16] Production.INFO: ProcessCDR(1,14596150,1,1,2) [2025-03-03 04:54:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596150,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:54:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596150,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:54:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596150,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:54:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596150,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:54:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596150', 'tblTempUsageDetail_20' ) start [2025-03-03 04:54:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596150', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:54:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:54:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:54:24] Production.INFO: ==11541== Releasing lock... [2025-03-03 04:54:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:54:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:55:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:55:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:55:16] Production.INFO: count ==409 [2025-03-03 04:55:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:55:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596155', 'tblTempUsageDetail_20' ) start [2025-03-03 04:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596155', 'tblTempUsageDetail_20' ) end [2025-03-03 04:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596155', 'tblTempVendorCDR_20' ) start [2025-03-03 04:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596155', 'tblTempVendorCDR_20' ) end [2025-03-03 04:55:16] Production.INFO: ProcessCDR(1,14596155,1,1,2) [2025-03-03 04:55:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596155,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:55:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596155,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:55:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596155,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:55:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596155,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596155', 'tblTempUsageDetail_20' ) start [2025-03-03 04:55:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596155', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:55:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:55:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:55:24] Production.INFO: ==11618== Releasing lock... [2025-03-03 04:55:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:55:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:56:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:56:17] Production.INFO: count ==409 [2025-03-03 04:56:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:56:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596160', 'tblTempUsageDetail_20' ) start [2025-03-03 04:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596160', 'tblTempUsageDetail_20' ) end [2025-03-03 04:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596160', 'tblTempVendorCDR_20' ) start [2025-03-03 04:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596160', 'tblTempVendorCDR_20' ) end [2025-03-03 04:56:17] Production.INFO: ProcessCDR(1,14596160,1,1,2) [2025-03-03 04:56:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596160,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:56:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596160,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:56:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596160,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:56:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596160,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:56:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596160', 'tblTempUsageDetail_20' ) start [2025-03-03 04:56:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596160', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:56:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:56:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:56:25] Production.INFO: ==11690== Releasing lock... [2025-03-03 04:56:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:56:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:57:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:57:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:57:16] Production.INFO: count ==409 [2025-03-03 04:57:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:57:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596165', 'tblTempUsageDetail_20' ) start [2025-03-03 04:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596165', 'tblTempUsageDetail_20' ) end [2025-03-03 04:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596165', 'tblTempVendorCDR_20' ) start [2025-03-03 04:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596165', 'tblTempVendorCDR_20' ) end [2025-03-03 04:57:16] Production.INFO: ProcessCDR(1,14596165,1,1,2) [2025-03-03 04:57:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596165,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:57:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596165,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:57:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596165,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:57:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596165,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:57:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596165', 'tblTempUsageDetail_20' ) start [2025-03-03 04:57:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596165', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:57:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:57:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:57:24] Production.INFO: ==11762== Releasing lock... [2025-03-03 04:57:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:57:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:58:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:58:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:58:16] Production.INFO: count ==409 [2025-03-03 04:58:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:58:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596170', 'tblTempUsageDetail_20' ) start [2025-03-03 04:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596170', 'tblTempUsageDetail_20' ) end [2025-03-03 04:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596170', 'tblTempVendorCDR_20' ) start [2025-03-03 04:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596170', 'tblTempVendorCDR_20' ) end [2025-03-03 04:58:16] Production.INFO: ProcessCDR(1,14596170,1,1,2) [2025-03-03 04:58:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596170,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:58:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596170,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:58:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596170,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:58:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596170,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:58:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596170', 'tblTempUsageDetail_20' ) start [2025-03-03 04:58:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596170', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:58:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:58:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:58:25] Production.INFO: ==11832== Releasing lock... [2025-03-03 04:58:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:58:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 04:59:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 04:59:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 04:59:17] Production.INFO: count ==409 [2025-03-03 04:59:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 04:59:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 04:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596175', 'tblTempUsageDetail_20' ) start [2025-03-03 04:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596175', 'tblTempUsageDetail_20' ) end [2025-03-03 04:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596175', 'tblTempVendorCDR_20' ) start [2025-03-03 04:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596175', 'tblTempVendorCDR_20' ) end [2025-03-03 04:59:17] Production.INFO: ProcessCDR(1,14596175,1,1,2) [2025-03-03 04:59:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596175,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:59:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596175,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 04:59:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596175,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:59:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596175,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 04:59:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596175', 'tblTempUsageDetail_20' ) start [2025-03-03 04:59:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596175', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 04:59:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 04:59:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 04:59:24] Production.INFO: ==11906== Releasing lock... [2025-03-03 04:59:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 04:59:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:00:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:00:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:00:17] Production.INFO: count ==409 [2025-03-03 05:00:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:00:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596181', 'tblTempUsageDetail_20' ) start [2025-03-03 05:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596181', 'tblTempUsageDetail_20' ) end [2025-03-03 05:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596181', 'tblTempVendorCDR_20' ) start [2025-03-03 05:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596181', 'tblTempVendorCDR_20' ) end [2025-03-03 05:00:17] Production.INFO: ProcessCDR(1,14596181,1,1,2) [2025-03-03 05:00:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596181,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:00:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596181,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:00:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596181,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:00:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596181,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:00:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596181', 'tblTempUsageDetail_20' ) start [2025-03-03 05:00:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596181', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:00:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:00:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:00:25] Production.INFO: ==12025== Releasing lock... [2025-03-03 05:00:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:00:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:01:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:01:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:01:17] Production.INFO: count ==409 [2025-03-03 05:01:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:01:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596186', 'tblTempUsageDetail_20' ) start [2025-03-03 05:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596186', 'tblTempUsageDetail_20' ) end [2025-03-03 05:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596186', 'tblTempVendorCDR_20' ) start [2025-03-03 05:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596186', 'tblTempVendorCDR_20' ) end [2025-03-03 05:01:17] Production.INFO: ProcessCDR(1,14596186,1,1,2) [2025-03-03 05:01:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596186,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:01:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596186,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:01:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596186,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:01:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596186,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:01:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596186', 'tblTempUsageDetail_20' ) start [2025-03-03 05:01:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596186', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:01:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:01:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:01:25] Production.INFO: ==12112== Releasing lock... [2025-03-03 05:01:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:01:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:02:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:02:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:02:16] Production.INFO: count ==409 [2025-03-03 05:02:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:02:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596191', 'tblTempUsageDetail_20' ) start [2025-03-03 05:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596191', 'tblTempUsageDetail_20' ) end [2025-03-03 05:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596191', 'tblTempVendorCDR_20' ) start [2025-03-03 05:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596191', 'tblTempVendorCDR_20' ) end [2025-03-03 05:02:17] Production.INFO: ProcessCDR(1,14596191,1,1,2) [2025-03-03 05:02:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596191,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:02:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596191,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:02:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596191,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:02:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596191,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:02:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596191', 'tblTempUsageDetail_20' ) start [2025-03-03 05:02:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596191', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:02:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:02:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:02:24] Production.INFO: ==12185== Releasing lock... [2025-03-03 05:02:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:02:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:03:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:03:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:03:17] Production.INFO: count ==409 [2025-03-03 05:03:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:03:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596196', 'tblTempUsageDetail_20' ) start [2025-03-03 05:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596196', 'tblTempUsageDetail_20' ) end [2025-03-03 05:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596196', 'tblTempVendorCDR_20' ) start [2025-03-03 05:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596196', 'tblTempVendorCDR_20' ) end [2025-03-03 05:03:17] Production.INFO: ProcessCDR(1,14596196,1,1,2) [2025-03-03 05:03:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596196,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:03:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596196,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:03:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596196,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:03:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596196,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:03:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596196', 'tblTempUsageDetail_20' ) start [2025-03-03 05:03:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596196', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:03:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:03:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:03:25] Production.INFO: ==12258== Releasing lock... [2025-03-03 05:03:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:03:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:04:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:04:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:04:16] Production.INFO: count ==409 [2025-03-03 05:04:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:04:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:04:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596201', 'tblTempUsageDetail_20' ) start [2025-03-03 05:04:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596201', 'tblTempUsageDetail_20' ) end [2025-03-03 05:04:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596201', 'tblTempVendorCDR_20' ) start [2025-03-03 05:04:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596201', 'tblTempVendorCDR_20' ) end [2025-03-03 05:04:16] Production.INFO: ProcessCDR(1,14596201,1,1,2) [2025-03-03 05:04:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596201,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:04:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596201,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:04:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596201,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:04:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596201,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:04:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596201', 'tblTempUsageDetail_20' ) start [2025-03-03 05:04:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596201', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:04:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:04:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:04:24] Production.INFO: ==12329== Releasing lock... [2025-03-03 05:04:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:04:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:05:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:05:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:05:17] Production.INFO: count ==409 [2025-03-03 05:05:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:05:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596206', 'tblTempUsageDetail_20' ) start [2025-03-03 05:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596206', 'tblTempUsageDetail_20' ) end [2025-03-03 05:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596206', 'tblTempVendorCDR_20' ) start [2025-03-03 05:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596206', 'tblTempVendorCDR_20' ) end [2025-03-03 05:05:17] Production.INFO: ProcessCDR(1,14596206,1,1,2) [2025-03-03 05:05:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596206,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:05:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596206,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:05:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596206,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:05:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596206,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:05:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596206', 'tblTempUsageDetail_20' ) start [2025-03-03 05:05:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596206', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:05:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:05:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:05:25] Production.INFO: ==12401== Releasing lock... [2025-03-03 05:05:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:05:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:06:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:06:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:06:16] Production.INFO: count ==409 [2025-03-03 05:06:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:06:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596211', 'tblTempUsageDetail_20' ) start [2025-03-03 05:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596211', 'tblTempUsageDetail_20' ) end [2025-03-03 05:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596211', 'tblTempVendorCDR_20' ) start [2025-03-03 05:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596211', 'tblTempVendorCDR_20' ) end [2025-03-03 05:06:17] Production.INFO: ProcessCDR(1,14596211,1,1,2) [2025-03-03 05:06:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596211,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:06:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596211,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:06:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596211,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:06:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596211,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:06:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596211', 'tblTempUsageDetail_20' ) start [2025-03-03 05:06:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596211', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:06:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:06:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:06:24] Production.INFO: ==12470== Releasing lock... [2025-03-03 05:06:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:06:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:07:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:07:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:07:17] Production.INFO: count ==409 [2025-03-03 05:07:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:07:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596216', 'tblTempUsageDetail_20' ) start [2025-03-03 05:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596216', 'tblTempUsageDetail_20' ) end [2025-03-03 05:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596216', 'tblTempVendorCDR_20' ) start [2025-03-03 05:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596216', 'tblTempVendorCDR_20' ) end [2025-03-03 05:07:17] Production.INFO: ProcessCDR(1,14596216,1,1,2) [2025-03-03 05:07:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596216,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:07:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596216,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:07:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596216,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:07:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596216,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:07:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596216', 'tblTempUsageDetail_20' ) start [2025-03-03 05:07:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596216', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:07:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:07:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:07:24] Production.INFO: ==12543== Releasing lock... [2025-03-03 05:07:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:07:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:08:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:08:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:08:16] Production.INFO: count ==409 [2025-03-03 05:08:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:08:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596221', 'tblTempUsageDetail_20' ) start [2025-03-03 05:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596221', 'tblTempUsageDetail_20' ) end [2025-03-03 05:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596221', 'tblTempVendorCDR_20' ) start [2025-03-03 05:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596221', 'tblTempVendorCDR_20' ) end [2025-03-03 05:08:16] Production.INFO: ProcessCDR(1,14596221,1,1,2) [2025-03-03 05:08:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596221,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:08:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596221,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:08:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596221,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:08:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596221,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:08:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596221', 'tblTempUsageDetail_20' ) start [2025-03-03 05:08:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596221', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:08:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:08:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:08:23] Production.INFO: ==12613== Releasing lock... [2025-03-03 05:08:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:08:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:09:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:09:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:09:16] Production.INFO: count ==409 [2025-03-03 05:09:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:09:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596226', 'tblTempUsageDetail_20' ) start [2025-03-03 05:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596226', 'tblTempUsageDetail_20' ) end [2025-03-03 05:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596226', 'tblTempVendorCDR_20' ) start [2025-03-03 05:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596226', 'tblTempVendorCDR_20' ) end [2025-03-03 05:09:17] Production.INFO: ProcessCDR(1,14596226,1,1,2) [2025-03-03 05:09:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596226,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:09:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596226,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:09:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596226,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:09:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596226,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:09:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596226', 'tblTempUsageDetail_20' ) start [2025-03-03 05:09:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596226', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:09:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:09:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:09:24] Production.INFO: ==12686== Releasing lock... [2025-03-03 05:09:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:09:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:10:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:10:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:10:16] Production.INFO: count ==409 [2025-03-03 05:10:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:10:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596232', 'tblTempUsageDetail_20' ) start [2025-03-03 05:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596232', 'tblTempUsageDetail_20' ) end [2025-03-03 05:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596232', 'tblTempVendorCDR_20' ) start [2025-03-03 05:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596232', 'tblTempVendorCDR_20' ) end [2025-03-03 05:10:17] Production.INFO: ProcessCDR(1,14596232,1,1,2) [2025-03-03 05:10:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596232,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:10:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596232,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:10:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596232,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:10:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596232,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:10:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596232', 'tblTempUsageDetail_20' ) start [2025-03-03 05:10:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596232', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:10:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:10:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:10:25] Production.INFO: ==12759== Releasing lock... [2025-03-03 05:10:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:10:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:11:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:11:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:11:17] Production.INFO: count ==409 [2025-03-03 05:11:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:11:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596237', 'tblTempUsageDetail_20' ) start [2025-03-03 05:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596237', 'tblTempUsageDetail_20' ) end [2025-03-03 05:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596237', 'tblTempVendorCDR_20' ) start [2025-03-03 05:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596237', 'tblTempVendorCDR_20' ) end [2025-03-03 05:11:17] Production.INFO: ProcessCDR(1,14596237,1,1,2) [2025-03-03 05:11:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596237,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:11:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596237,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:11:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596237,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:11:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596237,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:11:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596237', 'tblTempUsageDetail_20' ) start [2025-03-03 05:11:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596237', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:11:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:11:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:11:25] Production.INFO: ==12834== Releasing lock... [2025-03-03 05:11:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:11:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:12:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:12:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:12:16] Production.INFO: count ==409 [2025-03-03 05:12:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:12:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596242', 'tblTempUsageDetail_20' ) start [2025-03-03 05:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596242', 'tblTempUsageDetail_20' ) end [2025-03-03 05:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596242', 'tblTempVendorCDR_20' ) start [2025-03-03 05:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596242', 'tblTempVendorCDR_20' ) end [2025-03-03 05:12:16] Production.INFO: ProcessCDR(1,14596242,1,1,2) [2025-03-03 05:12:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596242,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:12:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596242,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:12:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596242,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:12:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596242,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:12:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596242', 'tblTempUsageDetail_20' ) start [2025-03-03 05:12:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596242', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:12:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:12:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:12:23] Production.INFO: ==12903== Releasing lock... [2025-03-03 05:12:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:12:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:13:16] Production.INFO: count ==409 [2025-03-03 05:13:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:13:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596247', 'tblTempUsageDetail_20' ) start [2025-03-03 05:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596247', 'tblTempUsageDetail_20' ) end [2025-03-03 05:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596247', 'tblTempVendorCDR_20' ) start [2025-03-03 05:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596247', 'tblTempVendorCDR_20' ) end [2025-03-03 05:13:17] Production.INFO: ProcessCDR(1,14596247,1,1,2) [2025-03-03 05:13:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596247,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:13:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596247,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:13:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596247,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:13:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596247,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:13:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596247', 'tblTempUsageDetail_20' ) start [2025-03-03 05:13:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596247', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:13:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:13:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:13:24] Production.INFO: ==12979== Releasing lock... [2025-03-03 05:13:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:13:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:14:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:14:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:14:16] Production.INFO: count ==409 [2025-03-03 05:14:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:14:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:14:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596252', 'tblTempUsageDetail_20' ) start [2025-03-03 05:14:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596252', 'tblTempUsageDetail_20' ) end [2025-03-03 05:14:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596252', 'tblTempVendorCDR_20' ) start [2025-03-03 05:14:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596252', 'tblTempVendorCDR_20' ) end [2025-03-03 05:14:16] Production.INFO: ProcessCDR(1,14596252,1,1,2) [2025-03-03 05:14:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596252,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:14:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596252,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:14:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596252,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:14:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596252,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:14:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596252', 'tblTempUsageDetail_20' ) start [2025-03-03 05:14:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596252', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:14:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:14:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:14:24] Production.INFO: ==13057== Releasing lock... [2025-03-03 05:14:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:14:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:15:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:15:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:15:16] Production.INFO: count ==409 [2025-03-03 05:15:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:15:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596257', 'tblTempUsageDetail_20' ) start [2025-03-03 05:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596257', 'tblTempUsageDetail_20' ) end [2025-03-03 05:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596257', 'tblTempVendorCDR_20' ) start [2025-03-03 05:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596257', 'tblTempVendorCDR_20' ) end [2025-03-03 05:15:17] Production.INFO: ProcessCDR(1,14596257,1,1,2) [2025-03-03 05:15:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596257,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:15:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596257,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:15:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596257,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:15:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596257,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:15:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596257', 'tblTempUsageDetail_20' ) start [2025-03-03 05:15:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596257', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:15:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:15:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:15:24] Production.INFO: ==13170== Releasing lock... [2025-03-03 05:15:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:15:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:16:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:16:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:16:17] Production.INFO: count ==409 [2025-03-03 05:16:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:16:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596262', 'tblTempUsageDetail_20' ) start [2025-03-03 05:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596262', 'tblTempUsageDetail_20' ) end [2025-03-03 05:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596262', 'tblTempVendorCDR_20' ) start [2025-03-03 05:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596262', 'tblTempVendorCDR_20' ) end [2025-03-03 05:16:17] Production.INFO: ProcessCDR(1,14596262,1,1,2) [2025-03-03 05:16:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596262,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:16:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596262,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:16:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596262,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:16:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596262,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:16:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596262', 'tblTempUsageDetail_20' ) start [2025-03-03 05:16:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596262', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:16:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:16:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:16:24] Production.INFO: ==13241== Releasing lock... [2025-03-03 05:16:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:16:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:17:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:17:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:17:16] Production.INFO: count ==409 [2025-03-03 05:17:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:17:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596267', 'tblTempUsageDetail_20' ) start [2025-03-03 05:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596267', 'tblTempUsageDetail_20' ) end [2025-03-03 05:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596267', 'tblTempVendorCDR_20' ) start [2025-03-03 05:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596267', 'tblTempVendorCDR_20' ) end [2025-03-03 05:17:16] Production.INFO: ProcessCDR(1,14596267,1,1,2) [2025-03-03 05:17:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596267,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:17:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596267,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:17:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596267,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:17:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596267,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596267', 'tblTempUsageDetail_20' ) start [2025-03-03 05:17:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596267', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:17:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:17:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:17:24] Production.INFO: ==13314== Releasing lock... [2025-03-03 05:17:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:17:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:18:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:18:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:18:16] Production.INFO: count ==409 [2025-03-03 05:18:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:18:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596272', 'tblTempUsageDetail_20' ) start [2025-03-03 05:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596272', 'tblTempUsageDetail_20' ) end [2025-03-03 05:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596272', 'tblTempVendorCDR_20' ) start [2025-03-03 05:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596272', 'tblTempVendorCDR_20' ) end [2025-03-03 05:18:16] Production.INFO: ProcessCDR(1,14596272,1,1,2) [2025-03-03 05:18:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596272,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:18:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596272,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:18:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596272,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:18:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596272,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596272', 'tblTempUsageDetail_20' ) start [2025-03-03 05:18:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596272', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:18:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:18:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:18:23] Production.INFO: ==13385== Releasing lock... [2025-03-03 05:18:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:18:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:19:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:19:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:19:16] Production.INFO: count ==409 [2025-03-03 05:19:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:19:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596277', 'tblTempUsageDetail_20' ) start [2025-03-03 05:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596277', 'tblTempUsageDetail_20' ) end [2025-03-03 05:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596277', 'tblTempVendorCDR_20' ) start [2025-03-03 05:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596277', 'tblTempVendorCDR_20' ) end [2025-03-03 05:19:16] Production.INFO: ProcessCDR(1,14596277,1,1,2) [2025-03-03 05:19:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596277,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:19:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596277,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:19:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596277,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:19:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596277,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:19:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596277', 'tblTempUsageDetail_20' ) start [2025-03-03 05:19:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596277', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:19:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:19:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:19:24] Production.INFO: ==13459== Releasing lock... [2025-03-03 05:19:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:19:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:20:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:20:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:20:17] Production.INFO: count ==409 [2025-03-03 05:20:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:20:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596283', 'tblTempUsageDetail_20' ) start [2025-03-03 05:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596283', 'tblTempUsageDetail_20' ) end [2025-03-03 05:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596283', 'tblTempVendorCDR_20' ) start [2025-03-03 05:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596283', 'tblTempVendorCDR_20' ) end [2025-03-03 05:20:17] Production.INFO: ProcessCDR(1,14596283,1,1,2) [2025-03-03 05:20:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596283,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:20:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596283,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:20:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596283,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:20:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596283,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596283', 'tblTempUsageDetail_20' ) start [2025-03-03 05:20:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596283', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:20:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:20:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:20:25] Production.INFO: ==13531== Releasing lock... [2025-03-03 05:20:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:20:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:21:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:21:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:21:16] Production.INFO: count ==409 [2025-03-03 05:21:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:21:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596288', 'tblTempUsageDetail_20' ) start [2025-03-03 05:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596288', 'tblTempUsageDetail_20' ) end [2025-03-03 05:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596288', 'tblTempVendorCDR_20' ) start [2025-03-03 05:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596288', 'tblTempVendorCDR_20' ) end [2025-03-03 05:21:16] Production.INFO: ProcessCDR(1,14596288,1,1,2) [2025-03-03 05:21:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596288,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:21:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596288,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:21:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596288,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:21:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596288,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:21:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596288', 'tblTempUsageDetail_20' ) start [2025-03-03 05:21:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596288', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:21:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:21:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:21:23] Production.INFO: ==13604== Releasing lock... [2025-03-03 05:21:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:21:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:22:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:22:17] Production.INFO: count ==409 [2025-03-03 05:22:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:22:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596293', 'tblTempUsageDetail_20' ) start [2025-03-03 05:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596293', 'tblTempUsageDetail_20' ) end [2025-03-03 05:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596293', 'tblTempVendorCDR_20' ) start [2025-03-03 05:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596293', 'tblTempVendorCDR_20' ) end [2025-03-03 05:22:17] Production.INFO: ProcessCDR(1,14596293,1,1,2) [2025-03-03 05:22:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596293,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:22:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596293,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:22:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596293,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:22:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596293,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:22:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596293', 'tblTempUsageDetail_20' ) start [2025-03-03 05:22:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596293', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:22:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:22:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:22:24] Production.INFO: ==13676== Releasing lock... [2025-03-03 05:22:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:22:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:23:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:23:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:23:15] Production.INFO: count ==409 [2025-03-03 05:23:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:23:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596298', 'tblTempUsageDetail_20' ) start [2025-03-03 05:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596298', 'tblTempUsageDetail_20' ) end [2025-03-03 05:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596298', 'tblTempVendorCDR_20' ) start [2025-03-03 05:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596298', 'tblTempVendorCDR_20' ) end [2025-03-03 05:23:16] Production.INFO: ProcessCDR(1,14596298,1,1,2) [2025-03-03 05:23:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596298,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:23:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596298,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:23:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596298,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:23:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596298,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:23:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596298', 'tblTempUsageDetail_20' ) start [2025-03-03 05:23:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596298', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:23:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:23:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:23:23] Production.INFO: ==13747== Releasing lock... [2025-03-03 05:23:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:23:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:24:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:24:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:24:17] Production.INFO: count ==409 [2025-03-03 05:24:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:24:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596303', 'tblTempUsageDetail_20' ) start [2025-03-03 05:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596303', 'tblTempUsageDetail_20' ) end [2025-03-03 05:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596303', 'tblTempVendorCDR_20' ) start [2025-03-03 05:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596303', 'tblTempVendorCDR_20' ) end [2025-03-03 05:24:17] Production.INFO: ProcessCDR(1,14596303,1,1,2) [2025-03-03 05:24:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596303,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:24:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596303,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:24:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596303,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:24:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596303,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596303', 'tblTempUsageDetail_20' ) start [2025-03-03 05:24:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596303', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:24:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:24:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:24:24] Production.INFO: ==13818== Releasing lock... [2025-03-03 05:24:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:24:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:25:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:25:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:25:16] Production.INFO: count ==409 [2025-03-03 05:25:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:25:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596308', 'tblTempUsageDetail_20' ) start [2025-03-03 05:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596308', 'tblTempUsageDetail_20' ) end [2025-03-03 05:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596308', 'tblTempVendorCDR_20' ) start [2025-03-03 05:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596308', 'tblTempVendorCDR_20' ) end [2025-03-03 05:25:16] Production.INFO: ProcessCDR(1,14596308,1,1,2) [2025-03-03 05:25:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596308,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:25:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596308,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:25:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596308,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:25:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596308,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596308', 'tblTempUsageDetail_20' ) start [2025-03-03 05:25:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596308', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:25:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:25:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:25:24] Production.INFO: ==13887== Releasing lock... [2025-03-03 05:25:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:25:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:26:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:26:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:26:16] Production.INFO: count ==409 [2025-03-03 05:26:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:26:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:26:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596313', 'tblTempUsageDetail_20' ) start [2025-03-03 05:26:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596313', 'tblTempUsageDetail_20' ) end [2025-03-03 05:26:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596313', 'tblTempVendorCDR_20' ) start [2025-03-03 05:26:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596313', 'tblTempVendorCDR_20' ) end [2025-03-03 05:26:16] Production.INFO: ProcessCDR(1,14596313,1,1,2) [2025-03-03 05:26:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596313,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:26:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596313,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:26:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596313,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:26:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596313,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:26:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596313', 'tblTempUsageDetail_20' ) start [2025-03-03 05:26:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596313', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:26:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:26:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:26:24] Production.INFO: ==13961== Releasing lock... [2025-03-03 05:26:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:26:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:27:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:27:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:27:16] Production.INFO: count ==409 [2025-03-03 05:27:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:27:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596318', 'tblTempUsageDetail_20' ) start [2025-03-03 05:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596318', 'tblTempUsageDetail_20' ) end [2025-03-03 05:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596318', 'tblTempVendorCDR_20' ) start [2025-03-03 05:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596318', 'tblTempVendorCDR_20' ) end [2025-03-03 05:27:16] Production.INFO: ProcessCDR(1,14596318,1,1,2) [2025-03-03 05:27:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596318,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:27:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596318,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:27:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596318,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:27:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596318,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:27:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596318', 'tblTempUsageDetail_20' ) start [2025-03-03 05:27:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596318', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:27:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:27:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:27:24] Production.INFO: ==14036== Releasing lock... [2025-03-03 05:27:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:27:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:28:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:28:17] Production.INFO: count ==409 [2025-03-03 05:28:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:28:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596323', 'tblTempUsageDetail_20' ) start [2025-03-03 05:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596323', 'tblTempUsageDetail_20' ) end [2025-03-03 05:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596323', 'tblTempVendorCDR_20' ) start [2025-03-03 05:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596323', 'tblTempVendorCDR_20' ) end [2025-03-03 05:28:17] Production.INFO: ProcessCDR(1,14596323,1,1,2) [2025-03-03 05:28:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596323,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:28:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596323,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:28:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596323,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:28:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596323,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:28:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596323', 'tblTempUsageDetail_20' ) start [2025-03-03 05:28:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596323', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:28:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:28:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:28:24] Production.INFO: ==14108== Releasing lock... [2025-03-03 05:28:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:28:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:29:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:29:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:29:16] Production.INFO: count ==409 [2025-03-03 05:29:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:29:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596328', 'tblTempUsageDetail_20' ) start [2025-03-03 05:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596328', 'tblTempUsageDetail_20' ) end [2025-03-03 05:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596328', 'tblTempVendorCDR_20' ) start [2025-03-03 05:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596328', 'tblTempVendorCDR_20' ) end [2025-03-03 05:29:16] Production.INFO: ProcessCDR(1,14596328,1,1,2) [2025-03-03 05:29:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596328,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:29:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596328,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:29:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596328,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:29:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596328,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:29:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596328', 'tblTempUsageDetail_20' ) start [2025-03-03 05:29:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596328', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:29:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:29:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:29:24] Production.INFO: ==14178== Releasing lock... [2025-03-03 05:29:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:29:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:30:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:30:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:30:17] Production.INFO: count ==409 [2025-03-03 05:30:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:30:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596334', 'tblTempUsageDetail_20' ) start [2025-03-03 05:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596334', 'tblTempUsageDetail_20' ) end [2025-03-03 05:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596334', 'tblTempVendorCDR_20' ) start [2025-03-03 05:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596334', 'tblTempVendorCDR_20' ) end [2025-03-03 05:30:18] Production.INFO: ProcessCDR(1,14596334,1,1,2) [2025-03-03 05:30:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596334,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:30:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596334,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:30:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596334,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:30:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596334,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:30:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596334', 'tblTempUsageDetail_20' ) start [2025-03-03 05:30:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596334', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:30:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:30:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:30:25] Production.INFO: ==14275== Releasing lock... [2025-03-03 05:30:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:30:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:31:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:31:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:31:16] Production.INFO: count ==409 [2025-03-03 05:31:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:31:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596339', 'tblTempUsageDetail_20' ) start [2025-03-03 05:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596339', 'tblTempUsageDetail_20' ) end [2025-03-03 05:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596339', 'tblTempVendorCDR_20' ) start [2025-03-03 05:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596339', 'tblTempVendorCDR_20' ) end [2025-03-03 05:31:16] Production.INFO: ProcessCDR(1,14596339,1,1,2) [2025-03-03 05:31:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596339,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:31:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596339,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:31:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596339,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:31:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596339,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:31:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596339', 'tblTempUsageDetail_20' ) start [2025-03-03 05:31:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596339', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:31:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:31:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:31:24] Production.INFO: ==14385== Releasing lock... [2025-03-03 05:31:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:31:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:32:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:32:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:32:16] Production.INFO: count ==409 [2025-03-03 05:32:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:32:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596344', 'tblTempUsageDetail_20' ) start [2025-03-03 05:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596344', 'tblTempUsageDetail_20' ) end [2025-03-03 05:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596344', 'tblTempVendorCDR_20' ) start [2025-03-03 05:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596344', 'tblTempVendorCDR_20' ) end [2025-03-03 05:32:17] Production.INFO: ProcessCDR(1,14596344,1,1,2) [2025-03-03 05:32:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596344,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:32:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596344,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:32:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596344,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:32:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596344,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:32:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596344', 'tblTempUsageDetail_20' ) start [2025-03-03 05:32:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596344', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:32:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:32:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:32:25] Production.INFO: ==14456== Releasing lock... [2025-03-03 05:32:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:32:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:33:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:33:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:33:16] Production.INFO: count ==409 [2025-03-03 05:33:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:33:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596349', 'tblTempUsageDetail_20' ) start [2025-03-03 05:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596349', 'tblTempUsageDetail_20' ) end [2025-03-03 05:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596349', 'tblTempVendorCDR_20' ) start [2025-03-03 05:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596349', 'tblTempVendorCDR_20' ) end [2025-03-03 05:33:16] Production.INFO: ProcessCDR(1,14596349,1,1,2) [2025-03-03 05:33:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596349,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:33:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596349,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:33:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596349,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:33:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596349,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:33:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596349', 'tblTempUsageDetail_20' ) start [2025-03-03 05:33:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596349', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:33:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:33:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:33:24] Production.INFO: ==14526== Releasing lock... [2025-03-03 05:33:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:33:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:34:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:34:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:34:16] Production.INFO: count ==409 [2025-03-03 05:34:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:34:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596354', 'tblTempUsageDetail_20' ) start [2025-03-03 05:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596354', 'tblTempUsageDetail_20' ) end [2025-03-03 05:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596354', 'tblTempVendorCDR_20' ) start [2025-03-03 05:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596354', 'tblTempVendorCDR_20' ) end [2025-03-03 05:34:17] Production.INFO: ProcessCDR(1,14596354,1,1,2) [2025-03-03 05:34:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596354,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:34:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596354,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:34:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596354,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:34:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596354,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:34:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596354', 'tblTempUsageDetail_20' ) start [2025-03-03 05:34:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596354', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:34:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:34:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:34:24] Production.INFO: ==14604== Releasing lock... [2025-03-03 05:34:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:34:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:35:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:35:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:35:16] Production.INFO: count ==409 [2025-03-03 05:35:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:35:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:35:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596359', 'tblTempUsageDetail_20' ) start [2025-03-03 05:35:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596359', 'tblTempUsageDetail_20' ) end [2025-03-03 05:35:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596359', 'tblTempVendorCDR_20' ) start [2025-03-03 05:35:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596359', 'tblTempVendorCDR_20' ) end [2025-03-03 05:35:16] Production.INFO: ProcessCDR(1,14596359,1,1,2) [2025-03-03 05:35:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596359,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:35:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596359,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:35:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596359,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:35:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596359,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:35:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596359', 'tblTempUsageDetail_20' ) start [2025-03-03 05:35:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596359', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:35:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:35:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:35:24] Production.INFO: ==14674== Releasing lock... [2025-03-03 05:35:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:35:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:36:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:36:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:36:16] Production.INFO: count ==409 [2025-03-03 05:36:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:36:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596364', 'tblTempUsageDetail_20' ) start [2025-03-03 05:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596364', 'tblTempUsageDetail_20' ) end [2025-03-03 05:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596364', 'tblTempVendorCDR_20' ) start [2025-03-03 05:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596364', 'tblTempVendorCDR_20' ) end [2025-03-03 05:36:16] Production.INFO: ProcessCDR(1,14596364,1,1,2) [2025-03-03 05:36:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596364,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:36:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596364,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:36:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596364,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:36:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596364,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:36:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596364', 'tblTempUsageDetail_20' ) start [2025-03-03 05:36:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596364', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:36:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:36:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:36:24] Production.INFO: ==14745== Releasing lock... [2025-03-03 05:36:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:36:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:37:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:37:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:37:17] Production.INFO: count ==409 [2025-03-03 05:37:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:37:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596369', 'tblTempUsageDetail_20' ) start [2025-03-03 05:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596369', 'tblTempUsageDetail_20' ) end [2025-03-03 05:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596369', 'tblTempVendorCDR_20' ) start [2025-03-03 05:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596369', 'tblTempVendorCDR_20' ) end [2025-03-03 05:37:17] Production.INFO: ProcessCDR(1,14596369,1,1,2) [2025-03-03 05:37:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596369,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:37:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596369,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:37:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596369,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:37:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596369,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:37:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596369', 'tblTempUsageDetail_20' ) start [2025-03-03 05:37:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596369', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:37:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:37:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:37:25] Production.INFO: ==14815== Releasing lock... [2025-03-03 05:37:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:37:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:38:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:38:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:38:16] Production.INFO: count ==409 [2025-03-03 05:38:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:38:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596374', 'tblTempUsageDetail_20' ) start [2025-03-03 05:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596374', 'tblTempUsageDetail_20' ) end [2025-03-03 05:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596374', 'tblTempVendorCDR_20' ) start [2025-03-03 05:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596374', 'tblTempVendorCDR_20' ) end [2025-03-03 05:38:16] Production.INFO: ProcessCDR(1,14596374,1,1,2) [2025-03-03 05:38:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596374,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:38:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596374,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:38:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596374,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:38:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596374,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596374', 'tblTempUsageDetail_20' ) start [2025-03-03 05:38:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596374', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:38:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:38:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:38:23] Production.INFO: ==14886== Releasing lock... [2025-03-03 05:38:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:38:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:39:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:39:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:39:16] Production.INFO: count ==409 [2025-03-03 05:39:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:39:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596379', 'tblTempUsageDetail_20' ) start [2025-03-03 05:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596379', 'tblTempUsageDetail_20' ) end [2025-03-03 05:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596379', 'tblTempVendorCDR_20' ) start [2025-03-03 05:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596379', 'tblTempVendorCDR_20' ) end [2025-03-03 05:39:17] Production.INFO: ProcessCDR(1,14596379,1,1,2) [2025-03-03 05:39:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596379,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:39:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596379,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:39:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596379,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:39:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596379,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:39:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596379', 'tblTempUsageDetail_20' ) start [2025-03-03 05:39:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596379', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:39:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:39:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:39:24] Production.INFO: ==14956== Releasing lock... [2025-03-03 05:39:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:39:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:40:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:40:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:40:16] Production.INFO: count ==409 [2025-03-03 05:40:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:40:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:40:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596384', 'tblTempUsageDetail_20' ) start [2025-03-03 05:40:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596384', 'tblTempUsageDetail_20' ) end [2025-03-03 05:40:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596384', 'tblTempVendorCDR_20' ) start [2025-03-03 05:40:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596384', 'tblTempVendorCDR_20' ) end [2025-03-03 05:40:16] Production.INFO: ProcessCDR(1,14596384,1,1,2) [2025-03-03 05:40:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596384,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:40:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596384,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:40:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596384,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:40:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596384,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:40:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596384', 'tblTempUsageDetail_20' ) start [2025-03-03 05:40:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596384', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:40:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:40:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:40:24] Production.INFO: ==15034== Releasing lock... [2025-03-03 05:40:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:40:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:41:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:41:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:41:16] Production.INFO: count ==409 [2025-03-03 05:41:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:41:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596390', 'tblTempUsageDetail_20' ) start [2025-03-03 05:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596390', 'tblTempUsageDetail_20' ) end [2025-03-03 05:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596390', 'tblTempVendorCDR_20' ) start [2025-03-03 05:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596390', 'tblTempVendorCDR_20' ) end [2025-03-03 05:41:17] Production.INFO: ProcessCDR(1,14596390,1,1,2) [2025-03-03 05:41:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596390,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:41:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596390,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:41:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596390,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:41:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596390,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:41:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596390', 'tblTempUsageDetail_20' ) start [2025-03-03 05:41:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596390', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:41:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:41:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:41:24] Production.INFO: ==15111== Releasing lock... [2025-03-03 05:41:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:41:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:42:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:42:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:42:15] Production.INFO: count ==409 [2025-03-03 05:42:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:42:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596395', 'tblTempUsageDetail_20' ) start [2025-03-03 05:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596395', 'tblTempUsageDetail_20' ) end [2025-03-03 05:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596395', 'tblTempVendorCDR_20' ) start [2025-03-03 05:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596395', 'tblTempVendorCDR_20' ) end [2025-03-03 05:42:16] Production.INFO: ProcessCDR(1,14596395,1,1,2) [2025-03-03 05:42:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596395,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:42:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596395,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:42:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596395,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:42:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596395,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:42:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596395', 'tblTempUsageDetail_20' ) start [2025-03-03 05:42:22] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596395', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:42:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:42:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:42:23] Production.INFO: ==15180== Releasing lock... [2025-03-03 05:42:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:42:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:43:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:43:16] Production.INFO: count ==409 [2025-03-03 05:43:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:43:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596400', 'tblTempUsageDetail_20' ) start [2025-03-03 05:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596400', 'tblTempUsageDetail_20' ) end [2025-03-03 05:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596400', 'tblTempVendorCDR_20' ) start [2025-03-03 05:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596400', 'tblTempVendorCDR_20' ) end [2025-03-03 05:43:17] Production.INFO: ProcessCDR(1,14596400,1,1,2) [2025-03-03 05:43:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596400,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:43:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596400,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:43:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596400,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:43:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596400,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:43:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596400', 'tblTempUsageDetail_20' ) start [2025-03-03 05:43:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596400', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:43:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:43:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:43:24] Production.INFO: ==15252== Releasing lock... [2025-03-03 05:43:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:43:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:44:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:44:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:44:16] Production.INFO: count ==409 [2025-03-03 05:44:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:44:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596405', 'tblTempUsageDetail_20' ) start [2025-03-03 05:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596405', 'tblTempUsageDetail_20' ) end [2025-03-03 05:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596405', 'tblTempVendorCDR_20' ) start [2025-03-03 05:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596405', 'tblTempVendorCDR_20' ) end [2025-03-03 05:44:17] Production.INFO: ProcessCDR(1,14596405,1,1,2) [2025-03-03 05:44:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596405,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:44:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596405,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:44:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596405,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:44:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596405,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:44:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596405', 'tblTempUsageDetail_20' ) start [2025-03-03 05:44:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596405', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:44:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:44:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:44:24] Production.INFO: ==15322== Releasing lock... [2025-03-03 05:44:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:44:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:45:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:45:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:45:16] Production.INFO: count ==409 [2025-03-03 05:45:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:45:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596410', 'tblTempUsageDetail_20' ) start [2025-03-03 05:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596410', 'tblTempUsageDetail_20' ) end [2025-03-03 05:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596410', 'tblTempVendorCDR_20' ) start [2025-03-03 05:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596410', 'tblTempVendorCDR_20' ) end [2025-03-03 05:45:16] Production.INFO: ProcessCDR(1,14596410,1,1,2) [2025-03-03 05:45:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596410,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:45:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596410,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:45:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596410,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:45:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596410,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:45:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596410', 'tblTempUsageDetail_20' ) start [2025-03-03 05:45:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596410', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:45:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:45:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:45:24] Production.INFO: ==15395== Releasing lock... [2025-03-03 05:45:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:45:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:46:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:46:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:46:16] Production.INFO: count ==409 [2025-03-03 05:46:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:46:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:46:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596415', 'tblTempUsageDetail_20' ) start [2025-03-03 05:46:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596415', 'tblTempUsageDetail_20' ) end [2025-03-03 05:46:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596415', 'tblTempVendorCDR_20' ) start [2025-03-03 05:46:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596415', 'tblTempVendorCDR_20' ) end [2025-03-03 05:46:16] Production.INFO: ProcessCDR(1,14596415,1,1,2) [2025-03-03 05:46:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596415,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:46:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596415,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:46:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596415,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:46:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596415,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596415', 'tblTempUsageDetail_20' ) start [2025-03-03 05:46:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596415', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:46:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:46:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:46:24] Production.INFO: ==15505== Releasing lock... [2025-03-03 05:46:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:46:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:47:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:47:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:47:17] Production.INFO: count ==409 [2025-03-03 05:47:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:47:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596420', 'tblTempUsageDetail_20' ) start [2025-03-03 05:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596420', 'tblTempUsageDetail_20' ) end [2025-03-03 05:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596420', 'tblTempVendorCDR_20' ) start [2025-03-03 05:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596420', 'tblTempVendorCDR_20' ) end [2025-03-03 05:47:17] Production.INFO: ProcessCDR(1,14596420,1,1,2) [2025-03-03 05:47:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596420,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:47:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596420,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:47:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596420,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:47:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596420,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:47:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596420', 'tblTempUsageDetail_20' ) start [2025-03-03 05:47:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596420', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:47:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:47:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:47:25] Production.INFO: ==15576== Releasing lock... [2025-03-03 05:47:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:47:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:48:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:48:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:48:16] Production.INFO: count ==409 [2025-03-03 05:48:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:48:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596425', 'tblTempUsageDetail_20' ) start [2025-03-03 05:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596425', 'tblTempUsageDetail_20' ) end [2025-03-03 05:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596425', 'tblTempVendorCDR_20' ) start [2025-03-03 05:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596425', 'tblTempVendorCDR_20' ) end [2025-03-03 05:48:16] Production.INFO: ProcessCDR(1,14596425,1,1,2) [2025-03-03 05:48:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596425,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:48:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596425,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:48:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596425,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:48:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596425,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:48:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596425', 'tblTempUsageDetail_20' ) start [2025-03-03 05:48:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596425', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:48:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:48:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:48:24] Production.INFO: ==15646== Releasing lock... [2025-03-03 05:48:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:48:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:49:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:49:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:49:16] Production.INFO: count ==409 [2025-03-03 05:49:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:49:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596430', 'tblTempUsageDetail_20' ) start [2025-03-03 05:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596430', 'tblTempUsageDetail_20' ) end [2025-03-03 05:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596430', 'tblTempVendorCDR_20' ) start [2025-03-03 05:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596430', 'tblTempVendorCDR_20' ) end [2025-03-03 05:49:16] Production.INFO: ProcessCDR(1,14596430,1,1,2) [2025-03-03 05:49:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596430,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:49:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596430,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:49:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596430,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:49:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596430,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:49:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596430', 'tblTempUsageDetail_20' ) start [2025-03-03 05:49:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596430', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:49:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:49:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:49:24] Production.INFO: ==15718== Releasing lock... [2025-03-03 05:49:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:49:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:50:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:50:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:50:16] Production.INFO: count ==409 [2025-03-03 05:50:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:50:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:50:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596435', 'tblTempUsageDetail_20' ) start [2025-03-03 05:50:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596435', 'tblTempUsageDetail_20' ) end [2025-03-03 05:50:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596435', 'tblTempVendorCDR_20' ) start [2025-03-03 05:50:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596435', 'tblTempVendorCDR_20' ) end [2025-03-03 05:50:16] Production.INFO: ProcessCDR(1,14596435,1,1,2) [2025-03-03 05:50:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596435,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:50:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596435,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:50:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596435,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:50:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596435,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:50:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596435', 'tblTempUsageDetail_20' ) start [2025-03-03 05:50:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596435', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:50:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:50:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:50:24] Production.INFO: ==15792== Releasing lock... [2025-03-03 05:50:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:50:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:51:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:51:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:51:16] Production.INFO: count ==409 [2025-03-03 05:51:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:51:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596441', 'tblTempUsageDetail_20' ) start [2025-03-03 05:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596441', 'tblTempUsageDetail_20' ) end [2025-03-03 05:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596441', 'tblTempVendorCDR_20' ) start [2025-03-03 05:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596441', 'tblTempVendorCDR_20' ) end [2025-03-03 05:51:16] Production.INFO: ProcessCDR(1,14596441,1,1,2) [2025-03-03 05:51:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596441,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:51:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596441,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:51:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596441,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:51:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596441,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:51:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596441', 'tblTempUsageDetail_20' ) start [2025-03-03 05:51:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596441', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:51:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:51:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:51:24] Production.INFO: ==15864== Releasing lock... [2025-03-03 05:51:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:51:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:52:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:52:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:52:16] Production.INFO: count ==409 [2025-03-03 05:52:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:52:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596446', 'tblTempUsageDetail_20' ) start [2025-03-03 05:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596446', 'tblTempUsageDetail_20' ) end [2025-03-03 05:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596446', 'tblTempVendorCDR_20' ) start [2025-03-03 05:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596446', 'tblTempVendorCDR_20' ) end [2025-03-03 05:52:17] Production.INFO: ProcessCDR(1,14596446,1,1,2) [2025-03-03 05:52:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596446,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:52:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596446,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:52:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596446,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:52:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596446,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:52:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596446', 'tblTempUsageDetail_20' ) start [2025-03-03 05:52:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596446', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:52:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:52:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:52:24] Production.INFO: ==15935== Releasing lock... [2025-03-03 05:52:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:52:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:53:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:53:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:53:16] Production.INFO: count ==409 [2025-03-03 05:53:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:53:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596451', 'tblTempUsageDetail_20' ) start [2025-03-03 05:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596451', 'tblTempUsageDetail_20' ) end [2025-03-03 05:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596451', 'tblTempVendorCDR_20' ) start [2025-03-03 05:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596451', 'tblTempVendorCDR_20' ) end [2025-03-03 05:53:16] Production.INFO: ProcessCDR(1,14596451,1,1,2) [2025-03-03 05:53:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596451,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:53:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596451,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:53:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596451,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:53:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596451,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596451', 'tblTempUsageDetail_20' ) start [2025-03-03 05:53:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596451', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:53:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:53:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:53:24] Production.INFO: ==16012== Releasing lock... [2025-03-03 05:53:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:53:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:54:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:54:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:54:17] Production.INFO: count ==409 [2025-03-03 05:54:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:54:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596456', 'tblTempUsageDetail_20' ) start [2025-03-03 05:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596456', 'tblTempUsageDetail_20' ) end [2025-03-03 05:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596456', 'tblTempVendorCDR_20' ) start [2025-03-03 05:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596456', 'tblTempVendorCDR_20' ) end [2025-03-03 05:54:17] Production.INFO: ProcessCDR(1,14596456,1,1,2) [2025-03-03 05:54:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596456,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:54:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596456,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:54:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596456,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:54:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596456,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:54:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596456', 'tblTempUsageDetail_20' ) start [2025-03-03 05:54:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596456', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:54:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:54:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:54:24] Production.INFO: ==16087== Releasing lock... [2025-03-03 05:54:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:54:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:55:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:55:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:55:16] Production.INFO: count ==409 [2025-03-03 05:55:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:55:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596461', 'tblTempUsageDetail_20' ) start [2025-03-03 05:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596461', 'tblTempUsageDetail_20' ) end [2025-03-03 05:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596461', 'tblTempVendorCDR_20' ) start [2025-03-03 05:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596461', 'tblTempVendorCDR_20' ) end [2025-03-03 05:55:16] Production.INFO: ProcessCDR(1,14596461,1,1,2) [2025-03-03 05:55:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596461,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:55:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596461,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:55:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596461,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:55:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596461,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596461', 'tblTempUsageDetail_20' ) start [2025-03-03 05:55:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596461', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:55:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:55:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:55:24] Production.INFO: ==16161== Releasing lock... [2025-03-03 05:55:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:55:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:56:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:56:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:56:16] Production.INFO: count ==409 [2025-03-03 05:56:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:56:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596466', 'tblTempUsageDetail_20' ) start [2025-03-03 05:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596466', 'tblTempUsageDetail_20' ) end [2025-03-03 05:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596466', 'tblTempVendorCDR_20' ) start [2025-03-03 05:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596466', 'tblTempVendorCDR_20' ) end [2025-03-03 05:56:16] Production.INFO: ProcessCDR(1,14596466,1,1,2) [2025-03-03 05:56:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596466,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:56:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596466,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:56:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596466,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:56:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596466,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:56:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596466', 'tblTempUsageDetail_20' ) start [2025-03-03 05:56:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596466', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:56:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:56:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:56:24] Production.INFO: ==16234== Releasing lock... [2025-03-03 05:56:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:56:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:57:03] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:57:03] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:57:15] Production.INFO: count ==409 [2025-03-03 05:57:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:57:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596471', 'tblTempUsageDetail_20' ) start [2025-03-03 05:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596471', 'tblTempUsageDetail_20' ) end [2025-03-03 05:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596471', 'tblTempVendorCDR_20' ) start [2025-03-03 05:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596471', 'tblTempVendorCDR_20' ) end [2025-03-03 05:57:16] Production.INFO: ProcessCDR(1,14596471,1,1,2) [2025-03-03 05:57:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596471,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:57:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596471,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:57:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596471,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:57:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596471,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:57:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596471', 'tblTempUsageDetail_20' ) start [2025-03-03 05:57:22] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596471', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:57:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:57:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:57:23] Production.INFO: ==16304== Releasing lock... [2025-03-03 05:57:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:57:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:58:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:58:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:58:16] Production.INFO: count ==409 [2025-03-03 05:58:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:58:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596476', 'tblTempUsageDetail_20' ) start [2025-03-03 05:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596476', 'tblTempUsageDetail_20' ) end [2025-03-03 05:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596476', 'tblTempVendorCDR_20' ) start [2025-03-03 05:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596476', 'tblTempVendorCDR_20' ) end [2025-03-03 05:58:16] Production.INFO: ProcessCDR(1,14596476,1,1,2) [2025-03-03 05:58:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596476,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:58:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596476,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:58:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596476,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:58:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596476,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:58:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596476', 'tblTempUsageDetail_20' ) start [2025-03-03 05:58:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596476', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:58:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:58:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:58:24] Production.INFO: ==16375== Releasing lock... [2025-03-03 05:58:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:58:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 05:59:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 05:59:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 05:59:16] Production.INFO: count ==409 [2025-03-03 05:59:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 05:59:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 05:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596481', 'tblTempUsageDetail_20' ) start [2025-03-03 05:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596481', 'tblTempUsageDetail_20' ) end [2025-03-03 05:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596481', 'tblTempVendorCDR_20' ) start [2025-03-03 05:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596481', 'tblTempVendorCDR_20' ) end [2025-03-03 05:59:16] Production.INFO: ProcessCDR(1,14596481,1,1,2) [2025-03-03 05:59:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596481,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:59:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596481,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 05:59:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596481,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:59:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596481,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 05:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596481', 'tblTempUsageDetail_20' ) start [2025-03-03 05:59:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596481', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 05:59:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 05:59:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 05:59:23] Production.INFO: ==16447== Releasing lock... [2025-03-03 05:59:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 05:59:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:00:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:00:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:00:17] Production.INFO: count ==409 [2025-03-03 06:00:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:00:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596487', 'tblTempUsageDetail_20' ) start [2025-03-03 06:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596487', 'tblTempUsageDetail_20' ) end [2025-03-03 06:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596487', 'tblTempVendorCDR_20' ) start [2025-03-03 06:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596487', 'tblTempVendorCDR_20' ) end [2025-03-03 06:00:17] Production.INFO: ProcessCDR(1,14596487,1,1,2) [2025-03-03 06:00:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596487,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:00:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596487,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:00:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596487,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:00:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596487,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:00:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596487', 'tblTempUsageDetail_20' ) start [2025-03-03 06:00:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596487', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:00:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:00:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:00:25] Production.INFO: ==16521== Releasing lock... [2025-03-03 06:00:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:00:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:01:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:01:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:01:16] Production.INFO: count ==409 [2025-03-03 06:01:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:01:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596492', 'tblTempUsageDetail_20' ) start [2025-03-03 06:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596492', 'tblTempUsageDetail_20' ) end [2025-03-03 06:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596492', 'tblTempVendorCDR_20' ) start [2025-03-03 06:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596492', 'tblTempVendorCDR_20' ) end [2025-03-03 06:01:16] Production.INFO: ProcessCDR(1,14596492,1,1,2) [2025-03-03 06:01:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596492,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:01:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596492,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:01:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596492,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:01:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596492,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596492', 'tblTempUsageDetail_20' ) start [2025-03-03 06:01:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596492', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:01:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:01:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:01:24] Production.INFO: ==16607== Releasing lock... [2025-03-03 06:01:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:01:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:02:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:02:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:02:16] Production.INFO: count ==409 [2025-03-03 06:02:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:02:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596497', 'tblTempUsageDetail_20' ) start [2025-03-03 06:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596497', 'tblTempUsageDetail_20' ) end [2025-03-03 06:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596497', 'tblTempVendorCDR_20' ) start [2025-03-03 06:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596497', 'tblTempVendorCDR_20' ) end [2025-03-03 06:02:17] Production.INFO: ProcessCDR(1,14596497,1,1,2) [2025-03-03 06:02:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596497,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:02:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596497,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:02:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596497,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:02:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596497,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:02:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596497', 'tblTempUsageDetail_20' ) start [2025-03-03 06:02:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596497', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:02:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:02:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:02:24] Production.INFO: ==16716== Releasing lock... [2025-03-03 06:02:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:02:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:03:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:03:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:03:15] Production.INFO: count ==409 [2025-03-03 06:03:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:03:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:03:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596502', 'tblTempUsageDetail_20' ) start [2025-03-03 06:03:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596502', 'tblTempUsageDetail_20' ) end [2025-03-03 06:03:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596502', 'tblTempVendorCDR_20' ) start [2025-03-03 06:03:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596502', 'tblTempVendorCDR_20' ) end [2025-03-03 06:03:16] Production.INFO: ProcessCDR(1,14596502,1,1,2) [2025-03-03 06:03:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596502,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:03:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596502,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:03:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596502,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:03:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596502,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:03:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596502', 'tblTempUsageDetail_20' ) start [2025-03-03 06:03:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596502', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:03:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:03:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:03:23] Production.INFO: ==16786== Releasing lock... [2025-03-03 06:03:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:03:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:04:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:04:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:04:16] Production.INFO: count ==409 [2025-03-03 06:04:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:04:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596507', 'tblTempUsageDetail_20' ) start [2025-03-03 06:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596507', 'tblTempUsageDetail_20' ) end [2025-03-03 06:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596507', 'tblTempVendorCDR_20' ) start [2025-03-03 06:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596507', 'tblTempVendorCDR_20' ) end [2025-03-03 06:04:17] Production.INFO: ProcessCDR(1,14596507,1,1,2) [2025-03-03 06:04:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596507,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:04:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596507,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:04:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596507,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:04:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596507,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:04:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596507', 'tblTempUsageDetail_20' ) start [2025-03-03 06:04:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596507', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:04:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:04:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:04:24] Production.INFO: ==16857== Releasing lock... [2025-03-03 06:04:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:04:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:05:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:05:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:05:16] Production.INFO: count ==409 [2025-03-03 06:05:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:05:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596512', 'tblTempUsageDetail_20' ) start [2025-03-03 06:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596512', 'tblTempUsageDetail_20' ) end [2025-03-03 06:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596512', 'tblTempVendorCDR_20' ) start [2025-03-03 06:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596512', 'tblTempVendorCDR_20' ) end [2025-03-03 06:05:16] Production.INFO: ProcessCDR(1,14596512,1,1,2) [2025-03-03 06:05:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596512,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:05:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596512,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:05:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596512,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:05:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596512,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:05:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596512', 'tblTempUsageDetail_20' ) start [2025-03-03 06:05:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596512', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:05:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:05:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:05:24] Production.INFO: ==16930== Releasing lock... [2025-03-03 06:05:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:05:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:06:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:06:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:06:16] Production.INFO: count ==409 [2025-03-03 06:06:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:06:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596517', 'tblTempUsageDetail_20' ) start [2025-03-03 06:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596517', 'tblTempUsageDetail_20' ) end [2025-03-03 06:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596517', 'tblTempVendorCDR_20' ) start [2025-03-03 06:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596517', 'tblTempVendorCDR_20' ) end [2025-03-03 06:06:16] Production.INFO: ProcessCDR(1,14596517,1,1,2) [2025-03-03 06:06:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596517,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:06:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596517,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:06:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596517,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:06:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596517,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:06:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596517', 'tblTempUsageDetail_20' ) start [2025-03-03 06:06:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596517', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:06:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:06:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:06:23] Production.INFO: ==17000== Releasing lock... [2025-03-03 06:06:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:06:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:07:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:07:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:07:16] Production.INFO: count ==409 [2025-03-03 06:07:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:07:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:07:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596522', 'tblTempUsageDetail_20' ) start [2025-03-03 06:07:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596522', 'tblTempUsageDetail_20' ) end [2025-03-03 06:07:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596522', 'tblTempVendorCDR_20' ) start [2025-03-03 06:07:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596522', 'tblTempVendorCDR_20' ) end [2025-03-03 06:07:16] Production.INFO: ProcessCDR(1,14596522,1,1,2) [2025-03-03 06:07:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596522,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:07:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596522,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:07:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596522,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:07:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596522,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:07:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596522', 'tblTempUsageDetail_20' ) start [2025-03-03 06:07:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596522', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:07:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:07:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:07:24] Production.INFO: ==17075== Releasing lock... [2025-03-03 06:07:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:07:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:08:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:08:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:08:16] Production.INFO: count ==409 [2025-03-03 06:08:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:08:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596527', 'tblTempUsageDetail_20' ) start [2025-03-03 06:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596527', 'tblTempUsageDetail_20' ) end [2025-03-03 06:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596527', 'tblTempVendorCDR_20' ) start [2025-03-03 06:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596527', 'tblTempVendorCDR_20' ) end [2025-03-03 06:08:16] Production.INFO: ProcessCDR(1,14596527,1,1,2) [2025-03-03 06:08:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596527,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:08:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596527,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:08:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596527,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:08:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596527,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:08:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596527', 'tblTempUsageDetail_20' ) start [2025-03-03 06:08:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596527', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:08:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:08:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:08:23] Production.INFO: ==17146== Releasing lock... [2025-03-03 06:08:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:08:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:09:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:09:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:09:16] Production.INFO: count ==409 [2025-03-03 06:09:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:09:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596531', 'tblTempUsageDetail_20' ) start [2025-03-03 06:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596531', 'tblTempUsageDetail_20' ) end [2025-03-03 06:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596531', 'tblTempVendorCDR_20' ) start [2025-03-03 06:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596531', 'tblTempVendorCDR_20' ) end [2025-03-03 06:09:16] Production.INFO: ProcessCDR(1,14596531,1,1,2) [2025-03-03 06:09:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596531,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:09:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596531,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:09:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596531,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:09:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596531,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:09:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596531', 'tblTempUsageDetail_20' ) start [2025-03-03 06:09:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596531', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:09:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:09:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:09:24] Production.INFO: ==17221== Releasing lock... [2025-03-03 06:09:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:09:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:10:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:10:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:10:16] Production.INFO: count ==409 [2025-03-03 06:10:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:10:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596538', 'tblTempUsageDetail_20' ) start [2025-03-03 06:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596538', 'tblTempUsageDetail_20' ) end [2025-03-03 06:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596538', 'tblTempVendorCDR_20' ) start [2025-03-03 06:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596538', 'tblTempVendorCDR_20' ) end [2025-03-03 06:10:17] Production.INFO: ProcessCDR(1,14596538,1,1,2) [2025-03-03 06:10:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596538,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:10:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596538,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:10:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596538,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:10:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596538,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:10:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596538', 'tblTempUsageDetail_20' ) start [2025-03-03 06:10:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596538', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:10:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:10:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:10:24] Production.INFO: ==17298== Releasing lock... [2025-03-03 06:10:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:10:24] Production.INFO: 33.5 MB #Memory Used# [2025-03-03 06:11:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:11:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:11:16] Production.INFO: count ==409 [2025-03-03 06:11:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:11:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596543', 'tblTempUsageDetail_20' ) start [2025-03-03 06:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596543', 'tblTempUsageDetail_20' ) end [2025-03-03 06:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596543', 'tblTempVendorCDR_20' ) start [2025-03-03 06:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596543', 'tblTempVendorCDR_20' ) end [2025-03-03 06:11:17] Production.INFO: ProcessCDR(1,14596543,1,1,2) [2025-03-03 06:11:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596543,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:11:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596543,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:11:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596543,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:11:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596543,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:11:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596543', 'tblTempUsageDetail_20' ) start [2025-03-03 06:11:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596543', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:11:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:11:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:11:24] Production.INFO: ==17375== Releasing lock... [2025-03-03 06:11:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:11:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:12:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:12:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:12:16] Production.INFO: count ==409 [2025-03-03 06:12:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:12:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596548', 'tblTempUsageDetail_20' ) start [2025-03-03 06:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596548', 'tblTempUsageDetail_20' ) end [2025-03-03 06:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596548', 'tblTempVendorCDR_20' ) start [2025-03-03 06:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596548', 'tblTempVendorCDR_20' ) end [2025-03-03 06:12:16] Production.INFO: ProcessCDR(1,14596548,1,1,2) [2025-03-03 06:12:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596548,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:12:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596548,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:12:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596548,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:12:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596548,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:12:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596548', 'tblTempUsageDetail_20' ) start [2025-03-03 06:12:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596548', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:12:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:12:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:12:24] Production.INFO: ==17448== Releasing lock... [2025-03-03 06:12:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:12:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:13:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:13:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:13:16] Production.INFO: count ==409 [2025-03-03 06:13:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:13:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:13:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596553', 'tblTempUsageDetail_20' ) start [2025-03-03 06:13:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596553', 'tblTempUsageDetail_20' ) end [2025-03-03 06:13:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596553', 'tblTempVendorCDR_20' ) start [2025-03-03 06:13:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596553', 'tblTempVendorCDR_20' ) end [2025-03-03 06:13:16] Production.INFO: ProcessCDR(1,14596553,1,1,2) [2025-03-03 06:13:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596553,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:13:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596553,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:13:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596553,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:13:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596553,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:13:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596553', 'tblTempUsageDetail_20' ) start [2025-03-03 06:13:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596553', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:13:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:13:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:13:24] Production.INFO: ==17527== Releasing lock... [2025-03-03 06:13:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:13:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:14:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:14:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:14:16] Production.INFO: count ==409 [2025-03-03 06:14:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:14:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:14:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596558', 'tblTempUsageDetail_20' ) start [2025-03-03 06:14:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596558', 'tblTempUsageDetail_20' ) end [2025-03-03 06:14:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596558', 'tblTempVendorCDR_20' ) start [2025-03-03 06:14:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596558', 'tblTempVendorCDR_20' ) end [2025-03-03 06:14:16] Production.INFO: ProcessCDR(1,14596558,1,1,2) [2025-03-03 06:14:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596558,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:14:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596558,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:14:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596558,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:14:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596558,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:14:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596558', 'tblTempUsageDetail_20' ) start [2025-03-03 06:14:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596558', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:14:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:14:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:14:24] Production.INFO: ==17604== Releasing lock... [2025-03-03 06:14:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:14:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:15:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:15:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:15:16] Production.INFO: count ==409 [2025-03-03 06:15:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:15:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596563', 'tblTempUsageDetail_20' ) start [2025-03-03 06:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596563', 'tblTempUsageDetail_20' ) end [2025-03-03 06:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596563', 'tblTempVendorCDR_20' ) start [2025-03-03 06:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596563', 'tblTempVendorCDR_20' ) end [2025-03-03 06:15:16] Production.INFO: ProcessCDR(1,14596563,1,1,2) [2025-03-03 06:15:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596563,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:15:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596563,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:15:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596563,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:15:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596563,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:15:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596563', 'tblTempUsageDetail_20' ) start [2025-03-03 06:15:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596563', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:15:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:15:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:15:24] Production.INFO: ==17678== Releasing lock... [2025-03-03 06:15:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:15:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:16:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:16:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:16:16] Production.INFO: count ==409 [2025-03-03 06:16:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:16:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596568', 'tblTempUsageDetail_20' ) start [2025-03-03 06:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596568', 'tblTempUsageDetail_20' ) end [2025-03-03 06:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596568', 'tblTempVendorCDR_20' ) start [2025-03-03 06:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596568', 'tblTempVendorCDR_20' ) end [2025-03-03 06:16:16] Production.INFO: ProcessCDR(1,14596568,1,1,2) [2025-03-03 06:16:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596568,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:16:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596568,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:16:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596568,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:16:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596568,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596568', 'tblTempUsageDetail_20' ) start [2025-03-03 06:16:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596568', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:16:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:16:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:16:24] Production.INFO: ==17754== Releasing lock... [2025-03-03 06:16:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:16:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:17:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:17:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:17:16] Production.INFO: count ==409 [2025-03-03 06:17:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:17:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596573', 'tblTempUsageDetail_20' ) start [2025-03-03 06:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596573', 'tblTempUsageDetail_20' ) end [2025-03-03 06:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596573', 'tblTempVendorCDR_20' ) start [2025-03-03 06:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596573', 'tblTempVendorCDR_20' ) end [2025-03-03 06:17:16] Production.INFO: ProcessCDR(1,14596573,1,1,2) [2025-03-03 06:17:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596573,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:17:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596573,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:17:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596573,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:17:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596573,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596573', 'tblTempUsageDetail_20' ) start [2025-03-03 06:17:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596573', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:17:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:17:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:17:24] Production.INFO: ==17866== Releasing lock... [2025-03-03 06:17:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:17:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:18:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:18:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:18:16] Production.INFO: count ==409 [2025-03-03 06:18:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:18:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596578', 'tblTempUsageDetail_20' ) start [2025-03-03 06:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596578', 'tblTempUsageDetail_20' ) end [2025-03-03 06:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596578', 'tblTempVendorCDR_20' ) start [2025-03-03 06:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596578', 'tblTempVendorCDR_20' ) end [2025-03-03 06:18:16] Production.INFO: ProcessCDR(1,14596578,1,1,2) [2025-03-03 06:18:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596578,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:18:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596578,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:18:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596578,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:18:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596578,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596578', 'tblTempUsageDetail_20' ) start [2025-03-03 06:18:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596578', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:18:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:18:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:18:24] Production.INFO: ==17941== Releasing lock... [2025-03-03 06:18:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:18:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:19:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:19:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:19:16] Production.INFO: count ==409 [2025-03-03 06:19:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:19:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596583', 'tblTempUsageDetail_20' ) start [2025-03-03 06:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596583', 'tblTempUsageDetail_20' ) end [2025-03-03 06:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596583', 'tblTempVendorCDR_20' ) start [2025-03-03 06:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596583', 'tblTempVendorCDR_20' ) end [2025-03-03 06:19:16] Production.INFO: ProcessCDR(1,14596583,1,1,2) [2025-03-03 06:19:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596583,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:19:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596583,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:19:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596583,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:19:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596583,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:19:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596583', 'tblTempUsageDetail_20' ) start [2025-03-03 06:19:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596583', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:19:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:19:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:19:24] Production.INFO: ==18017== Releasing lock... [2025-03-03 06:19:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:19:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:20:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:20:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:20:17] Production.INFO: count ==409 [2025-03-03 06:20:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:20:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596589', 'tblTempUsageDetail_20' ) start [2025-03-03 06:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596589', 'tblTempUsageDetail_20' ) end [2025-03-03 06:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596589', 'tblTempVendorCDR_20' ) start [2025-03-03 06:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596589', 'tblTempVendorCDR_20' ) end [2025-03-03 06:20:17] Production.INFO: ProcessCDR(1,14596589,1,1,2) [2025-03-03 06:20:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596589,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:20:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596589,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:20:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596589,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:20:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596589,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596589', 'tblTempUsageDetail_20' ) start [2025-03-03 06:20:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596589', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:20:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:20:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:20:25] Production.INFO: ==18095== Releasing lock... [2025-03-03 06:20:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:20:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:21:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:21:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:21:16] Production.INFO: count ==409 [2025-03-03 06:21:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:21:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596594', 'tblTempUsageDetail_20' ) start [2025-03-03 06:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596594', 'tblTempUsageDetail_20' ) end [2025-03-03 06:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596594', 'tblTempVendorCDR_20' ) start [2025-03-03 06:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596594', 'tblTempVendorCDR_20' ) end [2025-03-03 06:21:16] Production.INFO: ProcessCDR(1,14596594,1,1,2) [2025-03-03 06:21:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596594,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:21:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596594,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:21:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596594,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:21:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596594,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:21:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596594', 'tblTempUsageDetail_20' ) start [2025-03-03 06:21:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596594', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:21:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:21:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:21:24] Production.INFO: ==18172== Releasing lock... [2025-03-03 06:21:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:21:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:22:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:22:16] Production.INFO: count ==409 [2025-03-03 06:22:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:22:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596599', 'tblTempUsageDetail_20' ) start [2025-03-03 06:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596599', 'tblTempUsageDetail_20' ) end [2025-03-03 06:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596599', 'tblTempVendorCDR_20' ) start [2025-03-03 06:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596599', 'tblTempVendorCDR_20' ) end [2025-03-03 06:22:17] Production.INFO: ProcessCDR(1,14596599,1,1,2) [2025-03-03 06:22:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596599,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:22:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596599,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:22:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596599,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:22:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596599,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:22:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596599', 'tblTempUsageDetail_20' ) start [2025-03-03 06:22:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596599', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:22:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:22:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:22:24] Production.INFO: ==18247== Releasing lock... [2025-03-03 06:22:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:22:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:23:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:23:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:23:16] Production.INFO: count ==409 [2025-03-03 06:23:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:23:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596604', 'tblTempUsageDetail_20' ) start [2025-03-03 06:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596604', 'tblTempUsageDetail_20' ) end [2025-03-03 06:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596604', 'tblTempVendorCDR_20' ) start [2025-03-03 06:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596604', 'tblTempVendorCDR_20' ) end [2025-03-03 06:23:16] Production.INFO: ProcessCDR(1,14596604,1,1,2) [2025-03-03 06:23:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596604,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:23:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596604,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:23:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596604,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:23:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596604,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:23:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596604', 'tblTempUsageDetail_20' ) start [2025-03-03 06:23:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596604', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:23:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:23:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:23:24] Production.INFO: ==18320== Releasing lock... [2025-03-03 06:23:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:23:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:24:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:24:17] Production.INFO: count ==409 [2025-03-03 06:24:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:24:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596609', 'tblTempUsageDetail_20' ) start [2025-03-03 06:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596609', 'tblTempUsageDetail_20' ) end [2025-03-03 06:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596609', 'tblTempVendorCDR_20' ) start [2025-03-03 06:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596609', 'tblTempVendorCDR_20' ) end [2025-03-03 06:24:17] Production.INFO: ProcessCDR(1,14596609,1,1,2) [2025-03-03 06:24:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596609,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:24:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596609,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:24:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596609,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:24:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596609,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:24:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596609', 'tblTempUsageDetail_20' ) start [2025-03-03 06:24:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596609', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:24:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:24:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:24:25] Production.INFO: ==18402== Releasing lock... [2025-03-03 06:24:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:24:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:25:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:25:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:25:16] Production.INFO: count ==409 [2025-03-03 06:25:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:25:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596614', 'tblTempUsageDetail_20' ) start [2025-03-03 06:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596614', 'tblTempUsageDetail_20' ) end [2025-03-03 06:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596614', 'tblTempVendorCDR_20' ) start [2025-03-03 06:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596614', 'tblTempVendorCDR_20' ) end [2025-03-03 06:25:16] Production.INFO: ProcessCDR(1,14596614,1,1,2) [2025-03-03 06:25:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596614,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:25:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596614,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:25:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596614,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:25:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596614,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596614', 'tblTempUsageDetail_20' ) start [2025-03-03 06:25:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596614', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:25:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:25:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:25:24] Production.INFO: ==18477== Releasing lock... [2025-03-03 06:25:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:25:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:26:17] Production.INFO: count ==409 [2025-03-03 06:26:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:26:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596619', 'tblTempUsageDetail_20' ) start [2025-03-03 06:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596619', 'tblTempUsageDetail_20' ) end [2025-03-03 06:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596619', 'tblTempVendorCDR_20' ) start [2025-03-03 06:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596619', 'tblTempVendorCDR_20' ) end [2025-03-03 06:26:17] Production.INFO: ProcessCDR(1,14596619,1,1,2) [2025-03-03 06:26:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596619,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:26:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596619,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:26:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596619,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:26:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596619,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:26:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596619', 'tblTempUsageDetail_20' ) start [2025-03-03 06:26:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596619', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:26:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:26:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:26:25] Production.INFO: ==18551== Releasing lock... [2025-03-03 06:26:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:26:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:27:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:27:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:27:16] Production.INFO: count ==409 [2025-03-03 06:27:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:27:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596624', 'tblTempUsageDetail_20' ) start [2025-03-03 06:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596624', 'tblTempUsageDetail_20' ) end [2025-03-03 06:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596624', 'tblTempVendorCDR_20' ) start [2025-03-03 06:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596624', 'tblTempVendorCDR_20' ) end [2025-03-03 06:27:16] Production.INFO: ProcessCDR(1,14596624,1,1,2) [2025-03-03 06:27:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596624,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:27:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596624,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:27:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596624,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:27:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596624,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:27:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596624', 'tblTempUsageDetail_20' ) start [2025-03-03 06:27:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596624', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:27:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:27:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:27:24] Production.INFO: ==18627== Releasing lock... [2025-03-03 06:27:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:27:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:28:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:28:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:28:16] Production.INFO: count ==409 [2025-03-03 06:28:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:28:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:28:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596629', 'tblTempUsageDetail_20' ) start [2025-03-03 06:28:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596629', 'tblTempUsageDetail_20' ) end [2025-03-03 06:28:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596629', 'tblTempVendorCDR_20' ) start [2025-03-03 06:28:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596629', 'tblTempVendorCDR_20' ) end [2025-03-03 06:28:16] Production.INFO: ProcessCDR(1,14596629,1,1,2) [2025-03-03 06:28:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596629,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:28:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596629,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:28:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596629,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:28:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596629,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:28:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596629', 'tblTempUsageDetail_20' ) start [2025-03-03 06:28:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596629', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:28:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:28:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:28:24] Production.INFO: ==18699== Releasing lock... [2025-03-03 06:28:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:28:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:29:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:29:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:29:16] Production.INFO: count ==409 [2025-03-03 06:29:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:29:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596634', 'tblTempUsageDetail_20' ) start [2025-03-03 06:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596634', 'tblTempUsageDetail_20' ) end [2025-03-03 06:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596634', 'tblTempVendorCDR_20' ) start [2025-03-03 06:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596634', 'tblTempVendorCDR_20' ) end [2025-03-03 06:29:16] Production.INFO: ProcessCDR(1,14596634,1,1,2) [2025-03-03 06:29:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596634,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:29:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596634,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:29:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596634,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:29:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596634,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:29:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596634', 'tblTempUsageDetail_20' ) start [2025-03-03 06:29:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596634', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:29:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:29:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:29:24] Production.INFO: ==18777== Releasing lock... [2025-03-03 06:29:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:29:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:30:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:30:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:30:16] Production.INFO: count ==409 [2025-03-03 06:30:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:30:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596639', 'tblTempUsageDetail_20' ) start [2025-03-03 06:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596639', 'tblTempUsageDetail_20' ) end [2025-03-03 06:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596639', 'tblTempVendorCDR_20' ) start [2025-03-03 06:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596639', 'tblTempVendorCDR_20' ) end [2025-03-03 06:30:17] Production.INFO: ProcessCDR(1,14596639,1,1,2) [2025-03-03 06:30:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596639,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:30:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596639,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:30:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596639,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:30:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596639,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:30:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596639', 'tblTempUsageDetail_20' ) start [2025-03-03 06:30:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596639', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:30:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:30:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:30:25] Production.INFO: ==18857== Releasing lock... [2025-03-03 06:30:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:30:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:31:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:31:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:31:16] Production.INFO: count ==409 [2025-03-03 06:31:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:31:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596645', 'tblTempUsageDetail_20' ) start [2025-03-03 06:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596645', 'tblTempUsageDetail_20' ) end [2025-03-03 06:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596645', 'tblTempVendorCDR_20' ) start [2025-03-03 06:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596645', 'tblTempVendorCDR_20' ) end [2025-03-03 06:31:16] Production.INFO: ProcessCDR(1,14596645,1,1,2) [2025-03-03 06:31:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596645,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:31:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596645,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:31:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596645,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:31:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596645,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:31:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596645', 'tblTempUsageDetail_20' ) start [2025-03-03 06:31:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596645', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:31:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:31:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:31:24] Production.INFO: ==18933== Releasing lock... [2025-03-03 06:31:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:31:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:32:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:32:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:32:17] Production.INFO: count ==409 [2025-03-03 06:32:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:32:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596650', 'tblTempUsageDetail_20' ) start [2025-03-03 06:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596650', 'tblTempUsageDetail_20' ) end [2025-03-03 06:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596650', 'tblTempVendorCDR_20' ) start [2025-03-03 06:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596650', 'tblTempVendorCDR_20' ) end [2025-03-03 06:32:17] Production.INFO: ProcessCDR(1,14596650,1,1,2) [2025-03-03 06:32:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596650,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:32:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596650,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:32:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596650,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:32:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596650,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:32:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596650', 'tblTempUsageDetail_20' ) start [2025-03-03 06:32:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596650', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:32:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:32:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:32:26] Production.INFO: ==19012== Releasing lock... [2025-03-03 06:32:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:32:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:33:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:33:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:33:16] Production.INFO: count ==409 [2025-03-03 06:33:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:33:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596655', 'tblTempUsageDetail_20' ) start [2025-03-03 06:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596655', 'tblTempUsageDetail_20' ) end [2025-03-03 06:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596655', 'tblTempVendorCDR_20' ) start [2025-03-03 06:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596655', 'tblTempVendorCDR_20' ) end [2025-03-03 06:33:16] Production.INFO: ProcessCDR(1,14596655,1,1,2) [2025-03-03 06:33:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596655,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:33:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596655,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:33:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596655,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:33:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596655,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:33:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596655', 'tblTempUsageDetail_20' ) start [2025-03-03 06:33:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596655', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:33:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:33:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:33:25] Production.INFO: ==19129== Releasing lock... [2025-03-03 06:33:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:33:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:34:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:34:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:34:16] Production.INFO: count ==409 [2025-03-03 06:34:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:34:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596660', 'tblTempUsageDetail_20' ) start [2025-03-03 06:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596660', 'tblTempUsageDetail_20' ) end [2025-03-03 06:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596660', 'tblTempVendorCDR_20' ) start [2025-03-03 06:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596660', 'tblTempVendorCDR_20' ) end [2025-03-03 06:34:17] Production.INFO: ProcessCDR(1,14596660,1,1,2) [2025-03-03 06:34:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596660,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:34:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596660,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:34:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596660,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:34:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596660,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:34:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596660', 'tblTempUsageDetail_20' ) start [2025-03-03 06:34:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596660', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:34:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:34:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:34:24] Production.INFO: ==19209== Releasing lock... [2025-03-03 06:34:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:34:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:35:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:35:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:35:16] Production.INFO: count ==409 [2025-03-03 06:35:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:35:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596665', 'tblTempUsageDetail_20' ) start [2025-03-03 06:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596665', 'tblTempUsageDetail_20' ) end [2025-03-03 06:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596665', 'tblTempVendorCDR_20' ) start [2025-03-03 06:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596665', 'tblTempVendorCDR_20' ) end [2025-03-03 06:35:17] Production.INFO: ProcessCDR(1,14596665,1,1,2) [2025-03-03 06:35:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596665,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:35:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596665,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:35:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596665,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:35:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596665,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:35:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596665', 'tblTempUsageDetail_20' ) start [2025-03-03 06:35:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596665', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:35:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:35:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:35:24] Production.INFO: ==19286== Releasing lock... [2025-03-03 06:35:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:35:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:36:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:36:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:36:16] Production.INFO: count ==409 [2025-03-03 06:36:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:36:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596670', 'tblTempUsageDetail_20' ) start [2025-03-03 06:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596670', 'tblTempUsageDetail_20' ) end [2025-03-03 06:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596670', 'tblTempVendorCDR_20' ) start [2025-03-03 06:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596670', 'tblTempVendorCDR_20' ) end [2025-03-03 06:36:16] Production.INFO: ProcessCDR(1,14596670,1,1,2) [2025-03-03 06:36:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596670,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:36:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596670,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:36:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596670,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:36:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596670,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:36:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596670', 'tblTempUsageDetail_20' ) start [2025-03-03 06:36:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596670', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:36:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:36:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:36:24] Production.INFO: ==19360== Releasing lock... [2025-03-03 06:36:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:36:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:37:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:37:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:37:16] Production.INFO: count ==409 [2025-03-03 06:37:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:37:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:37:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596675', 'tblTempUsageDetail_20' ) start [2025-03-03 06:37:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596675', 'tblTempUsageDetail_20' ) end [2025-03-03 06:37:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596675', 'tblTempVendorCDR_20' ) start [2025-03-03 06:37:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596675', 'tblTempVendorCDR_20' ) end [2025-03-03 06:37:16] Production.INFO: ProcessCDR(1,14596675,1,1,2) [2025-03-03 06:37:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596675,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:37:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596675,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:37:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596675,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:37:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596675,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596675', 'tblTempUsageDetail_20' ) start [2025-03-03 06:37:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596675', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:37:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:37:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:37:24] Production.INFO: ==19435== Releasing lock... [2025-03-03 06:37:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:37:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:38:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:38:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:38:16] Production.INFO: count ==409 [2025-03-03 06:38:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:38:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596680', 'tblTempUsageDetail_20' ) start [2025-03-03 06:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596680', 'tblTempUsageDetail_20' ) end [2025-03-03 06:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596680', 'tblTempVendorCDR_20' ) start [2025-03-03 06:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596680', 'tblTempVendorCDR_20' ) end [2025-03-03 06:38:16] Production.INFO: ProcessCDR(1,14596680,1,1,2) [2025-03-03 06:38:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596680,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:38:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596680,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:38:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596680,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:38:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596680,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596680', 'tblTempUsageDetail_20' ) start [2025-03-03 06:38:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596680', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:38:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:38:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:38:24] Production.INFO: ==19512== Releasing lock... [2025-03-03 06:38:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:38:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:39:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:39:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:39:16] Production.INFO: count ==409 [2025-03-03 06:39:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:39:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596685', 'tblTempUsageDetail_20' ) start [2025-03-03 06:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596685', 'tblTempUsageDetail_20' ) end [2025-03-03 06:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596685', 'tblTempVendorCDR_20' ) start [2025-03-03 06:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596685', 'tblTempVendorCDR_20' ) end [2025-03-03 06:39:16] Production.INFO: ProcessCDR(1,14596685,1,1,2) [2025-03-03 06:39:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596685,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:39:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596685,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:39:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596685,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:39:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596685,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:39:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596685', 'tblTempUsageDetail_20' ) start [2025-03-03 06:39:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596685', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:39:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:39:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:39:24] Production.INFO: ==19588== Releasing lock... [2025-03-03 06:39:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:39:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:40:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:40:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:40:17] Production.INFO: count ==409 [2025-03-03 06:40:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:40:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596691', 'tblTempUsageDetail_20' ) start [2025-03-03 06:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596691', 'tblTempUsageDetail_20' ) end [2025-03-03 06:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596691', 'tblTempVendorCDR_20' ) start [2025-03-03 06:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596691', 'tblTempVendorCDR_20' ) end [2025-03-03 06:40:17] Production.INFO: ProcessCDR(1,14596691,1,1,2) [2025-03-03 06:40:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596691,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:40:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596691,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:40:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596691,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:40:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596691,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:40:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596691', 'tblTempUsageDetail_20' ) start [2025-03-03 06:40:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596691', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:40:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:40:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:40:25] Production.INFO: ==19665== Releasing lock... [2025-03-03 06:40:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:40:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:41:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:41:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:41:16] Production.INFO: count ==409 [2025-03-03 06:41:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:41:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596696', 'tblTempUsageDetail_20' ) start [2025-03-03 06:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596696', 'tblTempUsageDetail_20' ) end [2025-03-03 06:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596696', 'tblTempVendorCDR_20' ) start [2025-03-03 06:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596696', 'tblTempVendorCDR_20' ) end [2025-03-03 06:41:16] Production.INFO: ProcessCDR(1,14596696,1,1,2) [2025-03-03 06:41:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596696,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:41:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596696,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:41:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596696,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:41:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596696,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:41:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596696', 'tblTempUsageDetail_20' ) start [2025-03-03 06:41:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596696', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:41:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:41:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:41:24] Production.INFO: ==19741== Releasing lock... [2025-03-03 06:41:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:41:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:42:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:42:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:42:16] Production.INFO: count ==409 [2025-03-03 06:42:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:42:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596701', 'tblTempUsageDetail_20' ) start [2025-03-03 06:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596701', 'tblTempUsageDetail_20' ) end [2025-03-03 06:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596701', 'tblTempVendorCDR_20' ) start [2025-03-03 06:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596701', 'tblTempVendorCDR_20' ) end [2025-03-03 06:42:16] Production.INFO: ProcessCDR(1,14596701,1,1,2) [2025-03-03 06:42:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596701,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:42:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596701,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:42:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596701,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:42:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596701,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:42:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596701', 'tblTempUsageDetail_20' ) start [2025-03-03 06:42:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596701', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:42:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:42:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:42:24] Production.INFO: ==19814== Releasing lock... [2025-03-03 06:42:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:42:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:43:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:43:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:43:16] Production.INFO: count ==409 [2025-03-03 06:43:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:43:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596706', 'tblTempUsageDetail_20' ) start [2025-03-03 06:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596706', 'tblTempUsageDetail_20' ) end [2025-03-03 06:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596706', 'tblTempVendorCDR_20' ) start [2025-03-03 06:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596706', 'tblTempVendorCDR_20' ) end [2025-03-03 06:43:17] Production.INFO: ProcessCDR(1,14596706,1,1,2) [2025-03-03 06:43:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596706,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:43:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596706,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:43:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596706,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:43:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596706,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:43:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596706', 'tblTempUsageDetail_20' ) start [2025-03-03 06:43:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596706', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:43:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:43:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:43:24] Production.INFO: ==19893== Releasing lock... [2025-03-03 06:43:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:43:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:44:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:44:17] Production.INFO: count ==409 [2025-03-03 06:44:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:44:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596711', 'tblTempUsageDetail_20' ) start [2025-03-03 06:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596711', 'tblTempUsageDetail_20' ) end [2025-03-03 06:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596711', 'tblTempVendorCDR_20' ) start [2025-03-03 06:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596711', 'tblTempVendorCDR_20' ) end [2025-03-03 06:44:17] Production.INFO: ProcessCDR(1,14596711,1,1,2) [2025-03-03 06:44:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596711,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:44:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596711,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:44:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596711,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:44:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596711,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:44:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596711', 'tblTempUsageDetail_20' ) start [2025-03-03 06:44:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596711', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:44:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:44:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:44:25] Production.INFO: ==19966== Releasing lock... [2025-03-03 06:44:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:44:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:45:03] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:45:03] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:45:15] Production.INFO: count ==409 [2025-03-03 06:45:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:45:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596716', 'tblTempUsageDetail_20' ) start [2025-03-03 06:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596716', 'tblTempUsageDetail_20' ) end [2025-03-03 06:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596716', 'tblTempVendorCDR_20' ) start [2025-03-03 06:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596716', 'tblTempVendorCDR_20' ) end [2025-03-03 06:45:16] Production.INFO: ProcessCDR(1,14596716,1,1,2) [2025-03-03 06:45:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596716,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:45:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596716,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:45:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596716,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:45:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596716,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:45:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596716', 'tblTempUsageDetail_20' ) start [2025-03-03 06:45:22] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596716', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:45:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:45:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:45:23] Production.INFO: ==20044== Releasing lock... [2025-03-03 06:45:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:45:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:46:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:46:16] Production.INFO: count ==409 [2025-03-03 06:46:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:46:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596721', 'tblTempUsageDetail_20' ) start [2025-03-03 06:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596721', 'tblTempUsageDetail_20' ) end [2025-03-03 06:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596721', 'tblTempVendorCDR_20' ) start [2025-03-03 06:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596721', 'tblTempVendorCDR_20' ) end [2025-03-03 06:46:17] Production.INFO: ProcessCDR(1,14596721,1,1,2) [2025-03-03 06:46:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596721,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:46:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596721,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:46:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596721,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:46:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596721,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596721', 'tblTempUsageDetail_20' ) start [2025-03-03 06:46:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596721', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:46:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:46:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:46:24] Production.INFO: ==20118== Releasing lock... [2025-03-03 06:46:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:46:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:47:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:47:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:47:16] Production.INFO: count ==409 [2025-03-03 06:47:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:47:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596726', 'tblTempUsageDetail_20' ) start [2025-03-03 06:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596726', 'tblTempUsageDetail_20' ) end [2025-03-03 06:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596726', 'tblTempVendorCDR_20' ) start [2025-03-03 06:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596726', 'tblTempVendorCDR_20' ) end [2025-03-03 06:47:16] Production.INFO: ProcessCDR(1,14596726,1,1,2) [2025-03-03 06:47:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596726,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:47:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596726,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:47:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596726,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:47:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596726,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:47:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596726', 'tblTempUsageDetail_20' ) start [2025-03-03 06:47:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596726', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:47:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:47:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:47:24] Production.INFO: ==20189== Releasing lock... [2025-03-03 06:47:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:47:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:48:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:48:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:48:16] Production.INFO: count ==409 [2025-03-03 06:48:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:48:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596731', 'tblTempUsageDetail_20' ) start [2025-03-03 06:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596731', 'tblTempUsageDetail_20' ) end [2025-03-03 06:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596731', 'tblTempVendorCDR_20' ) start [2025-03-03 06:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596731', 'tblTempVendorCDR_20' ) end [2025-03-03 06:48:16] Production.INFO: ProcessCDR(1,14596731,1,1,2) [2025-03-03 06:48:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596731,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:48:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596731,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:48:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596731,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:48:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596731,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:48:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596731', 'tblTempUsageDetail_20' ) start [2025-03-03 06:48:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596731', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:48:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:48:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:48:24] Production.INFO: ==20310== Releasing lock... [2025-03-03 06:48:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:48:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:49:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:49:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:49:16] Production.INFO: count ==409 [2025-03-03 06:49:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:49:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596736', 'tblTempUsageDetail_20' ) start [2025-03-03 06:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596736', 'tblTempUsageDetail_20' ) end [2025-03-03 06:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596736', 'tblTempVendorCDR_20' ) start [2025-03-03 06:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596736', 'tblTempVendorCDR_20' ) end [2025-03-03 06:49:16] Production.INFO: ProcessCDR(1,14596736,1,1,2) [2025-03-03 06:49:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596736,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:49:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596736,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:49:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596736,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:49:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596736,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:49:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596736', 'tblTempUsageDetail_20' ) start [2025-03-03 06:49:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596736', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:49:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:49:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:49:23] Production.INFO: ==20392== Releasing lock... [2025-03-03 06:49:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:49:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:50:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:50:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:50:17] Production.INFO: count ==409 [2025-03-03 06:50:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:50:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596742', 'tblTempUsageDetail_20' ) start [2025-03-03 06:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596742', 'tblTempUsageDetail_20' ) end [2025-03-03 06:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596742', 'tblTempVendorCDR_20' ) start [2025-03-03 06:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596742', 'tblTempVendorCDR_20' ) end [2025-03-03 06:50:17] Production.INFO: ProcessCDR(1,14596742,1,1,2) [2025-03-03 06:50:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596742,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:50:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596742,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:50:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596742,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:50:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596742,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:50:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596742', 'tblTempUsageDetail_20' ) start [2025-03-03 06:50:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596742', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:50:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:50:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:50:25] Production.INFO: ==20465== Releasing lock... [2025-03-03 06:50:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:50:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:51:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:51:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:51:16] Production.INFO: count ==409 [2025-03-03 06:51:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:51:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596747', 'tblTempUsageDetail_20' ) start [2025-03-03 06:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596747', 'tblTempUsageDetail_20' ) end [2025-03-03 06:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596747', 'tblTempVendorCDR_20' ) start [2025-03-03 06:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596747', 'tblTempVendorCDR_20' ) end [2025-03-03 06:51:16] Production.INFO: ProcessCDR(1,14596747,1,1,2) [2025-03-03 06:51:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596747,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:51:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596747,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:51:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596747,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:51:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596747,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:51:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596747', 'tblTempUsageDetail_20' ) start [2025-03-03 06:51:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596747', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:51:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:51:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:51:23] Production.INFO: ==20548== Releasing lock... [2025-03-03 06:51:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:51:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:52:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:52:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:52:16] Production.INFO: count ==409 [2025-03-03 06:52:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:52:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:52:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596752', 'tblTempUsageDetail_20' ) start [2025-03-03 06:52:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596752', 'tblTempUsageDetail_20' ) end [2025-03-03 06:52:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596752', 'tblTempVendorCDR_20' ) start [2025-03-03 06:52:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596752', 'tblTempVendorCDR_20' ) end [2025-03-03 06:52:16] Production.INFO: ProcessCDR(1,14596752,1,1,2) [2025-03-03 06:52:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596752,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:52:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596752,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:52:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596752,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:52:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596752,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:52:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596752', 'tblTempUsageDetail_20' ) start [2025-03-03 06:52:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596752', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:52:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:52:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:52:24] Production.INFO: ==20621== Releasing lock... [2025-03-03 06:52:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:52:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:53:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:53:16] Production.INFO: count ==409 [2025-03-03 06:53:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:53:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596757', 'tblTempUsageDetail_20' ) start [2025-03-03 06:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596757', 'tblTempUsageDetail_20' ) end [2025-03-03 06:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596757', 'tblTempVendorCDR_20' ) start [2025-03-03 06:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596757', 'tblTempVendorCDR_20' ) end [2025-03-03 06:53:17] Production.INFO: ProcessCDR(1,14596757,1,1,2) [2025-03-03 06:53:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596757,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:53:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596757,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:53:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596757,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:53:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596757,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:53:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596757', 'tblTempUsageDetail_20' ) start [2025-03-03 06:53:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596757', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:53:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:53:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:53:24] Production.INFO: ==20699== Releasing lock... [2025-03-03 06:53:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:53:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:54:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:54:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:54:16] Production.INFO: count ==409 [2025-03-03 06:54:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:54:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:54:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596762', 'tblTempUsageDetail_20' ) start [2025-03-03 06:54:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596762', 'tblTempUsageDetail_20' ) end [2025-03-03 06:54:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596762', 'tblTempVendorCDR_20' ) start [2025-03-03 06:54:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596762', 'tblTempVendorCDR_20' ) end [2025-03-03 06:54:16] Production.INFO: ProcessCDR(1,14596762,1,1,2) [2025-03-03 06:54:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596762,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:54:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596762,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:54:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596762,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:54:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596762,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:54:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596762', 'tblTempUsageDetail_20' ) start [2025-03-03 06:54:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596762', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:54:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:54:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:54:24] Production.INFO: ==20773== Releasing lock... [2025-03-03 06:54:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:54:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:55:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:55:17] Production.INFO: count ==409 [2025-03-03 06:55:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:55:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596767', 'tblTempUsageDetail_20' ) start [2025-03-03 06:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596767', 'tblTempUsageDetail_20' ) end [2025-03-03 06:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596767', 'tblTempVendorCDR_20' ) start [2025-03-03 06:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596767', 'tblTempVendorCDR_20' ) end [2025-03-03 06:55:17] Production.INFO: ProcessCDR(1,14596767,1,1,2) [2025-03-03 06:55:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596767,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:55:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596767,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:55:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596767,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:55:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596767,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:55:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596767', 'tblTempUsageDetail_20' ) start [2025-03-03 06:55:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596767', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:55:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:55:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:55:25] Production.INFO: ==20848== Releasing lock... [2025-03-03 06:55:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:55:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:56:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:56:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:56:16] Production.INFO: count ==409 [2025-03-03 06:56:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:56:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596772', 'tblTempUsageDetail_20' ) start [2025-03-03 06:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596772', 'tblTempUsageDetail_20' ) end [2025-03-03 06:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596772', 'tblTempVendorCDR_20' ) start [2025-03-03 06:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596772', 'tblTempVendorCDR_20' ) end [2025-03-03 06:56:16] Production.INFO: ProcessCDR(1,14596772,1,1,2) [2025-03-03 06:56:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596772,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:56:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596772,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:56:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596772,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:56:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596772,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:56:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596772', 'tblTempUsageDetail_20' ) start [2025-03-03 06:56:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596772', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:56:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:56:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:56:24] Production.INFO: ==20923== Releasing lock... [2025-03-03 06:56:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:56:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:57:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:57:17] Production.INFO: count ==409 [2025-03-03 06:57:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:57:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596777', 'tblTempUsageDetail_20' ) start [2025-03-03 06:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596777', 'tblTempUsageDetail_20' ) end [2025-03-03 06:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596777', 'tblTempVendorCDR_20' ) start [2025-03-03 06:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596777', 'tblTempVendorCDR_20' ) end [2025-03-03 06:57:17] Production.INFO: ProcessCDR(1,14596777,1,1,2) [2025-03-03 06:57:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596777,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:57:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596777,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:57:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596777,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:57:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596777,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:57:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596777', 'tblTempUsageDetail_20' ) start [2025-03-03 06:57:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596777', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:57:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:57:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:57:25] Production.INFO: ==20999== Releasing lock... [2025-03-03 06:57:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:57:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:58:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:58:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:58:16] Production.INFO: count ==409 [2025-03-03 06:58:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:58:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596782', 'tblTempUsageDetail_20' ) start [2025-03-03 06:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596782', 'tblTempUsageDetail_20' ) end [2025-03-03 06:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596782', 'tblTempVendorCDR_20' ) start [2025-03-03 06:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596782', 'tblTempVendorCDR_20' ) end [2025-03-03 06:58:16] Production.INFO: ProcessCDR(1,14596782,1,1,2) [2025-03-03 06:58:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596782,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:58:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596782,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:58:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596782,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:58:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596782,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:58:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596782', 'tblTempUsageDetail_20' ) start [2025-03-03 06:58:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596782', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:58:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:58:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:58:24] Production.INFO: ==21072== Releasing lock... [2025-03-03 06:58:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:58:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 06:59:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 06:59:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 06:59:16] Production.INFO: count ==409 [2025-03-03 06:59:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 06:59:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 06:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596787', 'tblTempUsageDetail_20' ) start [2025-03-03 06:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596787', 'tblTempUsageDetail_20' ) end [2025-03-03 06:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596787', 'tblTempVendorCDR_20' ) start [2025-03-03 06:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596787', 'tblTempVendorCDR_20' ) end [2025-03-03 06:59:16] Production.INFO: ProcessCDR(1,14596787,1,1,2) [2025-03-03 06:59:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596787,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:59:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596787,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 06:59:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596787,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:59:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596787,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 06:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596787', 'tblTempUsageDetail_20' ) start [2025-03-03 06:59:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596787', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 06:59:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 06:59:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 06:59:24] Production.INFO: ==21147== Releasing lock... [2025-03-03 06:59:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 06:59:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:00:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:00:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:00:16] Production.INFO: count ==409 [2025-03-03 07:00:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:00:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596793', 'tblTempUsageDetail_20' ) start [2025-03-03 07:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596793', 'tblTempUsageDetail_20' ) end [2025-03-03 07:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596793', 'tblTempVendorCDR_20' ) start [2025-03-03 07:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596793', 'tblTempVendorCDR_20' ) end [2025-03-03 07:00:17] Production.INFO: ProcessCDR(1,14596793,1,1,2) [2025-03-03 07:00:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596793,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:00:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596793,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:00:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596793,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:00:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596793,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:00:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596793', 'tblTempUsageDetail_20' ) start [2025-03-03 07:00:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596793', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:00:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:00:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:00:24] Production.INFO: ==21228== Releasing lock... [2025-03-03 07:00:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:00:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:01:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:01:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:01:16] Production.INFO: count ==409 [2025-03-03 07:01:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:01:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596798', 'tblTempUsageDetail_20' ) start [2025-03-03 07:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596798', 'tblTempUsageDetail_20' ) end [2025-03-03 07:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596798', 'tblTempVendorCDR_20' ) start [2025-03-03 07:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596798', 'tblTempVendorCDR_20' ) end [2025-03-03 07:01:17] Production.INFO: ProcessCDR(1,14596798,1,1,2) [2025-03-03 07:01:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596798,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:01:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596798,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:01:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596798,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:01:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596798,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596798', 'tblTempUsageDetail_20' ) start [2025-03-03 07:01:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596798', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:01:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:01:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:01:24] Production.INFO: ==21322== Releasing lock... [2025-03-03 07:01:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:01:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:02:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:02:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:02:16] Production.INFO: count ==409 [2025-03-03 07:02:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:02:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596803', 'tblTempUsageDetail_20' ) start [2025-03-03 07:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596803', 'tblTempUsageDetail_20' ) end [2025-03-03 07:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596803', 'tblTempVendorCDR_20' ) start [2025-03-03 07:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596803', 'tblTempVendorCDR_20' ) end [2025-03-03 07:02:17] Production.INFO: ProcessCDR(1,14596803,1,1,2) [2025-03-03 07:02:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596803,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:02:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596803,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:02:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596803,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:02:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596803,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:02:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596803', 'tblTempUsageDetail_20' ) start [2025-03-03 07:02:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596803', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:02:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:02:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:02:25] Production.INFO: ==21480== Releasing lock... [2025-03-03 07:02:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:02:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:03:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:03:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:03:16] Production.INFO: count ==409 [2025-03-03 07:03:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:03:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:03:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596808', 'tblTempUsageDetail_20' ) start [2025-03-03 07:03:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596808', 'tblTempUsageDetail_20' ) end [2025-03-03 07:03:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596808', 'tblTempVendorCDR_20' ) start [2025-03-03 07:03:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596808', 'tblTempVendorCDR_20' ) end [2025-03-03 07:03:16] Production.INFO: ProcessCDR(1,14596808,1,1,2) [2025-03-03 07:03:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596808,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:03:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596808,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:03:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596808,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:03:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596808,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:03:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596808', 'tblTempUsageDetail_20' ) start [2025-03-03 07:03:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596808', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:03:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:03:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:03:24] Production.INFO: ==21556== Releasing lock... [2025-03-03 07:03:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:03:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:04:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:04:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:04:16] Production.INFO: count ==409 [2025-03-03 07:04:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:04:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:04:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596813', 'tblTempUsageDetail_20' ) start [2025-03-03 07:04:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596813', 'tblTempUsageDetail_20' ) end [2025-03-03 07:04:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596813', 'tblTempVendorCDR_20' ) start [2025-03-03 07:04:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596813', 'tblTempVendorCDR_20' ) end [2025-03-03 07:04:16] Production.INFO: ProcessCDR(1,14596813,1,1,2) [2025-03-03 07:04:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596813,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:04:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596813,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:04:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596813,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:04:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596813,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:04:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596813', 'tblTempUsageDetail_20' ) start [2025-03-03 07:04:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596813', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:04:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:04:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:04:24] Production.INFO: ==21672== Releasing lock... [2025-03-03 07:04:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:04:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:05:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:05:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:05:17] Production.INFO: count ==409 [2025-03-03 07:05:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:05:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596818', 'tblTempUsageDetail_20' ) start [2025-03-03 07:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596818', 'tblTempUsageDetail_20' ) end [2025-03-03 07:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596818', 'tblTempVendorCDR_20' ) start [2025-03-03 07:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596818', 'tblTempVendorCDR_20' ) end [2025-03-03 07:05:17] Production.INFO: ProcessCDR(1,14596818,1,1,2) [2025-03-03 07:05:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596818,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:05:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596818,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:05:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596818,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:05:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596818,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:05:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596818', 'tblTempUsageDetail_20' ) start [2025-03-03 07:05:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596818', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:05:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:05:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:05:25] Production.INFO: ==21828== Releasing lock... [2025-03-03 07:05:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:05:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:06:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:06:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:06:16] Production.INFO: count ==409 [2025-03-03 07:06:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:06:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596823', 'tblTempUsageDetail_20' ) start [2025-03-03 07:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596823', 'tblTempUsageDetail_20' ) end [2025-03-03 07:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596823', 'tblTempVendorCDR_20' ) start [2025-03-03 07:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596823', 'tblTempVendorCDR_20' ) end [2025-03-03 07:06:16] Production.INFO: ProcessCDR(1,14596823,1,1,2) [2025-03-03 07:06:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596823,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:06:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596823,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:06:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596823,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:06:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596823,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:06:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596823', 'tblTempUsageDetail_20' ) start [2025-03-03 07:06:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596823', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:06:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:06:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:06:24] Production.INFO: ==21910== Releasing lock... [2025-03-03 07:06:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:06:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:07:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:07:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:07:18] Production.INFO: count ==409 [2025-03-03 07:07:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:07:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596828', 'tblTempUsageDetail_20' ) start [2025-03-03 07:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596828', 'tblTempUsageDetail_20' ) end [2025-03-03 07:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596828', 'tblTempVendorCDR_20' ) start [2025-03-03 07:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596828', 'tblTempVendorCDR_20' ) end [2025-03-03 07:07:18] Production.INFO: ProcessCDR(1,14596828,1,1,2) [2025-03-03 07:07:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596828,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:07:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596828,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:07:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596828,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:07:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596828,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:07:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596828', 'tblTempUsageDetail_20' ) start [2025-03-03 07:07:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596828', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:07:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:07:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:07:26] Production.INFO: ==21990== Releasing lock... [2025-03-03 07:07:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:07:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:08:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:08:16] Production.INFO: count ==409 [2025-03-03 07:08:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:08:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596833', 'tblTempUsageDetail_20' ) start [2025-03-03 07:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596833', 'tblTempUsageDetail_20' ) end [2025-03-03 07:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596833', 'tblTempVendorCDR_20' ) start [2025-03-03 07:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596833', 'tblTempVendorCDR_20' ) end [2025-03-03 07:08:16] Production.INFO: ProcessCDR(1,14596833,1,1,2) [2025-03-03 07:08:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596833,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:08:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596833,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:08:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596833,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:08:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596833,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:08:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596833', 'tblTempUsageDetail_20' ) start [2025-03-03 07:08:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596833', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:08:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:08:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:08:24] Production.INFO: ==22113== Releasing lock... [2025-03-03 07:08:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:08:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:09:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:09:17] Production.INFO: count ==409 [2025-03-03 07:09:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:09:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596838', 'tblTempUsageDetail_20' ) start [2025-03-03 07:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596838', 'tblTempUsageDetail_20' ) end [2025-03-03 07:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596838', 'tblTempVendorCDR_20' ) start [2025-03-03 07:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596838', 'tblTempVendorCDR_20' ) end [2025-03-03 07:09:17] Production.INFO: ProcessCDR(1,14596838,1,1,2) [2025-03-03 07:09:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596838,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:09:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596838,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:09:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596838,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:09:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596838,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:09:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596838', 'tblTempUsageDetail_20' ) start [2025-03-03 07:09:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596838', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:09:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:09:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:09:25] Production.INFO: ==22231== Releasing lock... [2025-03-03 07:09:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:09:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:10:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:10:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:10:17] Production.INFO: count ==409 [2025-03-03 07:10:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:10:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596844', 'tblTempUsageDetail_20' ) start [2025-03-03 07:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596844', 'tblTempUsageDetail_20' ) end [2025-03-03 07:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596844', 'tblTempVendorCDR_20' ) start [2025-03-03 07:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596844', 'tblTempVendorCDR_20' ) end [2025-03-03 07:10:17] Production.INFO: ProcessCDR(1,14596844,1,1,2) [2025-03-03 07:10:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596844,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:10:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596844,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:10:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596844,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:10:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596844,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:10:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596844', 'tblTempUsageDetail_20' ) start [2025-03-03 07:10:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596844', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:10:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:10:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:10:25] Production.INFO: ==22318== Releasing lock... [2025-03-03 07:10:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:10:25] Production.INFO: 33.5 MB #Memory Used# [2025-03-03 07:11:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:11:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:11:17] Production.INFO: count ==409 [2025-03-03 07:11:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:11:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596849', 'tblTempUsageDetail_20' ) start [2025-03-03 07:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596849', 'tblTempUsageDetail_20' ) end [2025-03-03 07:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596849', 'tblTempVendorCDR_20' ) start [2025-03-03 07:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596849', 'tblTempVendorCDR_20' ) end [2025-03-03 07:11:17] Production.INFO: ProcessCDR(1,14596849,1,1,2) [2025-03-03 07:11:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596849,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:11:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596849,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:11:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596849,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:11:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596849,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:11:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596849', 'tblTempUsageDetail_20' ) start [2025-03-03 07:11:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596849', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:11:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:11:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:11:24] Production.INFO: ==22415== Releasing lock... [2025-03-03 07:11:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:11:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:12:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:12:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:12:16] Production.INFO: count ==409 [2025-03-03 07:12:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:12:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596854', 'tblTempUsageDetail_20' ) start [2025-03-03 07:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596854', 'tblTempUsageDetail_20' ) end [2025-03-03 07:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596854', 'tblTempVendorCDR_20' ) start [2025-03-03 07:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596854', 'tblTempVendorCDR_20' ) end [2025-03-03 07:12:17] Production.INFO: ProcessCDR(1,14596854,1,1,2) [2025-03-03 07:12:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596854,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:12:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596854,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:12:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596854,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:12:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596854,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:12:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596854', 'tblTempUsageDetail_20' ) start [2025-03-03 07:12:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596854', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:12:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:12:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:12:24] Production.INFO: ==22592== Releasing lock... [2025-03-03 07:12:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:12:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:13:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:13:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:13:16] Production.INFO: count ==409 [2025-03-03 07:13:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:13:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596859', 'tblTempUsageDetail_20' ) start [2025-03-03 07:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596859', 'tblTempUsageDetail_20' ) end [2025-03-03 07:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596859', 'tblTempVendorCDR_20' ) start [2025-03-03 07:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596859', 'tblTempVendorCDR_20' ) end [2025-03-03 07:13:17] Production.INFO: ProcessCDR(1,14596859,1,1,2) [2025-03-03 07:13:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596859,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:13:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596859,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:13:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596859,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:13:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596859,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:13:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596859', 'tblTempUsageDetail_20' ) start [2025-03-03 07:13:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596859', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:13:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:13:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:13:24] Production.INFO: ==22688== Releasing lock... [2025-03-03 07:13:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:13:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:14:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:14:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:14:17] Production.INFO: count ==409 [2025-03-03 07:14:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:14:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596864', 'tblTempUsageDetail_20' ) start [2025-03-03 07:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596864', 'tblTempUsageDetail_20' ) end [2025-03-03 07:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596864', 'tblTempVendorCDR_20' ) start [2025-03-03 07:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596864', 'tblTempVendorCDR_20' ) end [2025-03-03 07:14:17] Production.INFO: ProcessCDR(1,14596864,1,1,2) [2025-03-03 07:14:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596864,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:14:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596864,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:14:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596864,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:14:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596864,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:14:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596864', 'tblTempUsageDetail_20' ) start [2025-03-03 07:14:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596864', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:14:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:14:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:14:25] Production.INFO: ==22784== Releasing lock... [2025-03-03 07:14:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:14:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:15:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:15:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:15:16] Production.INFO: count ==409 [2025-03-03 07:15:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:15:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596869', 'tblTempUsageDetail_20' ) start [2025-03-03 07:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596869', 'tblTempUsageDetail_20' ) end [2025-03-03 07:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596869', 'tblTempVendorCDR_20' ) start [2025-03-03 07:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596869', 'tblTempVendorCDR_20' ) end [2025-03-03 07:15:17] Production.INFO: ProcessCDR(1,14596869,1,1,2) [2025-03-03 07:15:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596869,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:15:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596869,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:15:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596869,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:15:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596869,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:15:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596869', 'tblTempUsageDetail_20' ) start [2025-03-03 07:15:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596869', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:15:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:15:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:15:24] Production.INFO: ==22963== Releasing lock... [2025-03-03 07:15:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:15:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:16:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:16:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:16:17] Production.INFO: count ==409 [2025-03-03 07:16:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:16:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596874', 'tblTempUsageDetail_20' ) start [2025-03-03 07:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596874', 'tblTempUsageDetail_20' ) end [2025-03-03 07:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596874', 'tblTempVendorCDR_20' ) start [2025-03-03 07:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596874', 'tblTempVendorCDR_20' ) end [2025-03-03 07:16:17] Production.INFO: ProcessCDR(1,14596874,1,1,2) [2025-03-03 07:16:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596874,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:16:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596874,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:16:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596874,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:16:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596874,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:16:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596874', 'tblTempUsageDetail_20' ) start [2025-03-03 07:16:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596874', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:16:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:16:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:16:25] Production.INFO: ==23052== Releasing lock... [2025-03-03 07:16:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:16:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:17:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:17:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:17:16] Production.INFO: count ==409 [2025-03-03 07:17:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:17:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596879', 'tblTempUsageDetail_20' ) start [2025-03-03 07:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596879', 'tblTempUsageDetail_20' ) end [2025-03-03 07:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596879', 'tblTempVendorCDR_20' ) start [2025-03-03 07:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596879', 'tblTempVendorCDR_20' ) end [2025-03-03 07:17:16] Production.INFO: ProcessCDR(1,14596879,1,1,2) [2025-03-03 07:17:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596879,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:17:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596879,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:17:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596879,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:17:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596879,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596879', 'tblTempUsageDetail_20' ) start [2025-03-03 07:17:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596879', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:17:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:17:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:17:24] Production.INFO: ==23149== Releasing lock... [2025-03-03 07:17:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:17:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:18:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:18:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:18:16] Production.INFO: count ==409 [2025-03-03 07:18:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:18:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596884', 'tblTempUsageDetail_20' ) start [2025-03-03 07:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596884', 'tblTempUsageDetail_20' ) end [2025-03-03 07:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596884', 'tblTempVendorCDR_20' ) start [2025-03-03 07:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596884', 'tblTempVendorCDR_20' ) end [2025-03-03 07:18:16] Production.INFO: ProcessCDR(1,14596884,1,1,2) [2025-03-03 07:18:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596884,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:18:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596884,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:18:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596884,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:18:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596884,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:18:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596884', 'tblTempUsageDetail_20' ) start [2025-03-03 07:18:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596884', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:18:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:18:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:18:24] Production.INFO: ==23240== Releasing lock... [2025-03-03 07:18:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:18:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:19:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:19:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:19:16] Production.INFO: count ==409 [2025-03-03 07:19:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:19:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596889', 'tblTempUsageDetail_20' ) start [2025-03-03 07:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596889', 'tblTempUsageDetail_20' ) end [2025-03-03 07:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596889', 'tblTempVendorCDR_20' ) start [2025-03-03 07:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596889', 'tblTempVendorCDR_20' ) end [2025-03-03 07:19:17] Production.INFO: ProcessCDR(1,14596889,1,1,2) [2025-03-03 07:19:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596889,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:19:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596889,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:19:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596889,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:19:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596889,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:19:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596889', 'tblTempUsageDetail_20' ) start [2025-03-03 07:19:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596889', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:19:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:19:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:19:25] Production.INFO: ==23381== Releasing lock... [2025-03-03 07:19:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:19:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:20:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:20:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:20:17] Production.INFO: count ==409 [2025-03-03 07:20:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:20:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596895', 'tblTempUsageDetail_20' ) start [2025-03-03 07:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596895', 'tblTempUsageDetail_20' ) end [2025-03-03 07:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596895', 'tblTempVendorCDR_20' ) start [2025-03-03 07:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596895', 'tblTempVendorCDR_20' ) end [2025-03-03 07:20:17] Production.INFO: ProcessCDR(1,14596895,1,1,2) [2025-03-03 07:20:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596895,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:20:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596895,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:20:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596895,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:20:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596895,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596895', 'tblTempUsageDetail_20' ) start [2025-03-03 07:20:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596895', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:20:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:20:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:20:25] Production.INFO: ==23476== Releasing lock... [2025-03-03 07:20:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:20:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:21:03] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:21:03] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:21:15] Production.INFO: count ==409 [2025-03-03 07:21:15] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:21:15] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:21:15] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596896', 'tblTempUsageDetail_20' ) start [2025-03-03 07:21:15] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596896', 'tblTempUsageDetail_20' ) end [2025-03-03 07:21:15] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596896', 'tblTempVendorCDR_20' ) start [2025-03-03 07:21:15] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596896', 'tblTempVendorCDR_20' ) end [2025-03-03 07:21:15] Production.INFO: ProcessCDR(1,14596896,1,1,2) [2025-03-03 07:21:15] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596896,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:21:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596896,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:21:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596896,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:21:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596896,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:21:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596896', 'tblTempUsageDetail_20' ) start [2025-03-03 07:21:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596896', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:21:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:21:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:21:24] Production.INFO: ==23572== Releasing lock... [2025-03-03 07:21:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:21:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:22:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:22:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:22:16] Production.INFO: count ==409 [2025-03-03 07:22:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:22:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596905', 'tblTempUsageDetail_20' ) start [2025-03-03 07:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596905', 'tblTempUsageDetail_20' ) end [2025-03-03 07:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596905', 'tblTempVendorCDR_20' ) start [2025-03-03 07:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596905', 'tblTempVendorCDR_20' ) end [2025-03-03 07:22:17] Production.INFO: ProcessCDR(1,14596905,1,1,2) [2025-03-03 07:22:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596905,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:22:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596905,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:22:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596905,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:22:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596905,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:22:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596905', 'tblTempUsageDetail_20' ) start [2025-03-03 07:22:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596905', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:22:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:22:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:22:26] Production.INFO: ==23668== Releasing lock... [2025-03-03 07:22:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:22:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:23:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:23:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:23:16] Production.INFO: count ==409 [2025-03-03 07:23:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:23:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596910', 'tblTempUsageDetail_20' ) start [2025-03-03 07:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596910', 'tblTempUsageDetail_20' ) end [2025-03-03 07:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596910', 'tblTempVendorCDR_20' ) start [2025-03-03 07:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596910', 'tblTempVendorCDR_20' ) end [2025-03-03 07:23:16] Production.INFO: ProcessCDR(1,14596910,1,1,2) [2025-03-03 07:23:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596910,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:23:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596910,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:23:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596910,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:23:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596910,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:23:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596910', 'tblTempUsageDetail_20' ) start [2025-03-03 07:23:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596910', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:23:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:23:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:23:25] Production.INFO: ==23758== Releasing lock... [2025-03-03 07:23:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:23:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:24:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:24:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:24:16] Production.INFO: count ==409 [2025-03-03 07:24:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:24:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596915', 'tblTempUsageDetail_20' ) start [2025-03-03 07:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596915', 'tblTempUsageDetail_20' ) end [2025-03-03 07:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596915', 'tblTempVendorCDR_20' ) start [2025-03-03 07:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596915', 'tblTempVendorCDR_20' ) end [2025-03-03 07:24:17] Production.INFO: ProcessCDR(1,14596915,1,1,2) [2025-03-03 07:24:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596915,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:24:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596915,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:24:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596915,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:24:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596915,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:24:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596915', 'tblTempUsageDetail_20' ) start [2025-03-03 07:24:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596915', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:24:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:24:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:24:24] Production.INFO: ==23855== Releasing lock... [2025-03-03 07:24:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:24:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:25:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:25:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:25:16] Production.INFO: count ==409 [2025-03-03 07:25:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:25:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596920', 'tblTempUsageDetail_20' ) start [2025-03-03 07:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596920', 'tblTempUsageDetail_20' ) end [2025-03-03 07:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596920', 'tblTempVendorCDR_20' ) start [2025-03-03 07:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596920', 'tblTempVendorCDR_20' ) end [2025-03-03 07:25:16] Production.INFO: ProcessCDR(1,14596920,1,1,2) [2025-03-03 07:25:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596920,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:25:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596920,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:25:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596920,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:25:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596920,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:25:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596920', 'tblTempUsageDetail_20' ) start [2025-03-03 07:25:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596920', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:25:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:25:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:25:24] Production.INFO: ==23950== Releasing lock... [2025-03-03 07:25:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:25:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:26:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:26:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:26:16] Production.INFO: count ==409 [2025-03-03 07:26:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:26:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:26:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596925', 'tblTempUsageDetail_20' ) start [2025-03-03 07:26:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596925', 'tblTempUsageDetail_20' ) end [2025-03-03 07:26:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596925', 'tblTempVendorCDR_20' ) start [2025-03-03 07:26:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596925', 'tblTempVendorCDR_20' ) end [2025-03-03 07:26:16] Production.INFO: ProcessCDR(1,14596925,1,1,2) [2025-03-03 07:26:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596925,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:26:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596925,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:26:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596925,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:26:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596925,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:26:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596925', 'tblTempUsageDetail_20' ) start [2025-03-03 07:26:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596925', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:26:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:26:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:26:24] Production.INFO: ==24044== Releasing lock... [2025-03-03 07:26:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:26:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:27:03] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:27:03] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:27:15] Production.INFO: count ==409 [2025-03-03 07:27:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:27:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596930', 'tblTempUsageDetail_20' ) start [2025-03-03 07:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596930', 'tblTempUsageDetail_20' ) end [2025-03-03 07:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596930', 'tblTempVendorCDR_20' ) start [2025-03-03 07:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596930', 'tblTempVendorCDR_20' ) end [2025-03-03 07:27:16] Production.INFO: ProcessCDR(1,14596930,1,1,2) [2025-03-03 07:27:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596930,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:27:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596930,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:27:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596930,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:27:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596930,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:27:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596930', 'tblTempUsageDetail_20' ) start [2025-03-03 07:27:22] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596930', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:27:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:27:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:27:23] Production.INFO: ==24138== Releasing lock... [2025-03-03 07:27:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:27:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:28:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:28:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:28:16] Production.INFO: count ==409 [2025-03-03 07:28:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:28:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:28:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596935', 'tblTempUsageDetail_20' ) start [2025-03-03 07:28:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596935', 'tblTempUsageDetail_20' ) end [2025-03-03 07:28:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596935', 'tblTempVendorCDR_20' ) start [2025-03-03 07:28:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596935', 'tblTempVendorCDR_20' ) end [2025-03-03 07:28:16] Production.INFO: ProcessCDR(1,14596935,1,1,2) [2025-03-03 07:28:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596935,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:28:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596935,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:28:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596935,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:28:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596935,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:28:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596935', 'tblTempUsageDetail_20' ) start [2025-03-03 07:28:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596935', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:28:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:28:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:28:24] Production.INFO: ==24228== Releasing lock... [2025-03-03 07:28:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:28:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:29:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:29:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:29:16] Production.INFO: count ==409 [2025-03-03 07:29:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:29:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596940', 'tblTempUsageDetail_20' ) start [2025-03-03 07:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596940', 'tblTempUsageDetail_20' ) end [2025-03-03 07:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596940', 'tblTempVendorCDR_20' ) start [2025-03-03 07:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596940', 'tblTempVendorCDR_20' ) end [2025-03-03 07:29:16] Production.INFO: ProcessCDR(1,14596940,1,1,2) [2025-03-03 07:29:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596940,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:29:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596940,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:29:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596940,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:29:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596940,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:29:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596940', 'tblTempUsageDetail_20' ) start [2025-03-03 07:29:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596940', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:29:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:29:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:29:24] Production.INFO: ==24321== Releasing lock... [2025-03-03 07:29:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:29:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:30:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:30:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:30:17] Production.INFO: count ==409 [2025-03-03 07:30:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:30:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596946', 'tblTempUsageDetail_20' ) start [2025-03-03 07:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596946', 'tblTempUsageDetail_20' ) end [2025-03-03 07:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596946', 'tblTempVendorCDR_20' ) start [2025-03-03 07:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596946', 'tblTempVendorCDR_20' ) end [2025-03-03 07:30:17] Production.INFO: ProcessCDR(1,14596946,1,1,2) [2025-03-03 07:30:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596946,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:30:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596946,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:30:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596946,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:30:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596946,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:30:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596946', 'tblTempUsageDetail_20' ) start [2025-03-03 07:30:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596946', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:30:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:30:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:30:25] Production.INFO: ==24418== Releasing lock... [2025-03-03 07:30:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:30:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:31:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:31:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:31:16] Production.INFO: count ==409 [2025-03-03 07:31:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:31:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596951', 'tblTempUsageDetail_20' ) start [2025-03-03 07:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596951', 'tblTempUsageDetail_20' ) end [2025-03-03 07:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596951', 'tblTempVendorCDR_20' ) start [2025-03-03 07:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596951', 'tblTempVendorCDR_20' ) end [2025-03-03 07:31:16] Production.INFO: ProcessCDR(1,14596951,1,1,2) [2025-03-03 07:31:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596951,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:31:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596951,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:31:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596951,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:31:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596951,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:31:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596951', 'tblTempUsageDetail_20' ) start [2025-03-03 07:31:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596951', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:31:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:31:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:31:23] Production.INFO: ==24511== Releasing lock... [2025-03-03 07:31:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:31:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:32:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:32:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:32:16] Production.INFO: count ==409 [2025-03-03 07:32:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:32:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596956', 'tblTempUsageDetail_20' ) start [2025-03-03 07:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596956', 'tblTempUsageDetail_20' ) end [2025-03-03 07:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596956', 'tblTempVendorCDR_20' ) start [2025-03-03 07:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596956', 'tblTempVendorCDR_20' ) end [2025-03-03 07:32:17] Production.INFO: ProcessCDR(1,14596956,1,1,2) [2025-03-03 07:32:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596956,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:32:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596956,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:32:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596956,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:32:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596956,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:32:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596956', 'tblTempUsageDetail_20' ) start [2025-03-03 07:32:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596956', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:32:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:32:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:32:24] Production.INFO: ==24602== Releasing lock... [2025-03-03 07:32:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:32:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:33:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:33:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:33:16] Production.INFO: count ==409 [2025-03-03 07:33:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:33:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596961', 'tblTempUsageDetail_20' ) start [2025-03-03 07:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596961', 'tblTempUsageDetail_20' ) end [2025-03-03 07:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596961', 'tblTempVendorCDR_20' ) start [2025-03-03 07:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596961', 'tblTempVendorCDR_20' ) end [2025-03-03 07:33:16] Production.INFO: ProcessCDR(1,14596961,1,1,2) [2025-03-03 07:33:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596961,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:33:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596961,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:33:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596961,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:33:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596961,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:33:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596961', 'tblTempUsageDetail_20' ) start [2025-03-03 07:33:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596961', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:33:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:33:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:33:24] Production.INFO: ==24694== Releasing lock... [2025-03-03 07:33:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:33:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:34:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:34:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:34:16] Production.INFO: count ==409 [2025-03-03 07:34:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:34:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596966', 'tblTempUsageDetail_20' ) start [2025-03-03 07:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596966', 'tblTempUsageDetail_20' ) end [2025-03-03 07:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596966', 'tblTempVendorCDR_20' ) start [2025-03-03 07:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596966', 'tblTempVendorCDR_20' ) end [2025-03-03 07:34:16] Production.INFO: ProcessCDR(1,14596966,1,1,2) [2025-03-03 07:34:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596966,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:34:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596966,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:34:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596966,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:34:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596966,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:34:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596966', 'tblTempUsageDetail_20' ) start [2025-03-03 07:34:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596966', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:34:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:34:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:34:24] Production.INFO: ==24824== Releasing lock... [2025-03-03 07:34:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:34:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:35:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:35:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:35:16] Production.INFO: count ==409 [2025-03-03 07:35:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:35:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596971', 'tblTempUsageDetail_20' ) start [2025-03-03 07:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596971', 'tblTempUsageDetail_20' ) end [2025-03-03 07:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596971', 'tblTempVendorCDR_20' ) start [2025-03-03 07:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596971', 'tblTempVendorCDR_20' ) end [2025-03-03 07:35:17] Production.INFO: ProcessCDR(1,14596971,1,1,2) [2025-03-03 07:35:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596971,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:35:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596971,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:35:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596971,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:35:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596971,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:35:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596971', 'tblTempUsageDetail_20' ) start [2025-03-03 07:35:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596971', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:35:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:35:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:35:24] Production.INFO: ==24909== Releasing lock... [2025-03-03 07:35:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:35:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:36:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:36:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:36:16] Production.INFO: count ==409 [2025-03-03 07:36:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:36:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596976', 'tblTempUsageDetail_20' ) start [2025-03-03 07:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596976', 'tblTempUsageDetail_20' ) end [2025-03-03 07:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596976', 'tblTempVendorCDR_20' ) start [2025-03-03 07:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596976', 'tblTempVendorCDR_20' ) end [2025-03-03 07:36:16] Production.INFO: ProcessCDR(1,14596976,1,1,2) [2025-03-03 07:36:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596976,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:36:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596976,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:36:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596976,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:36:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596976,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:36:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596976', 'tblTempUsageDetail_20' ) start [2025-03-03 07:36:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596976', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:36:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:36:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:36:24] Production.INFO: ==25001== Releasing lock... [2025-03-03 07:36:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:36:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:37:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:37:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:37:16] Production.INFO: count ==409 [2025-03-03 07:37:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:37:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596981', 'tblTempUsageDetail_20' ) start [2025-03-03 07:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596981', 'tblTempUsageDetail_20' ) end [2025-03-03 07:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596981', 'tblTempVendorCDR_20' ) start [2025-03-03 07:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596981', 'tblTempVendorCDR_20' ) end [2025-03-03 07:37:17] Production.INFO: ProcessCDR(1,14596981,1,1,2) [2025-03-03 07:37:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596981,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:37:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596981,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:37:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596981,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:37:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596981,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:37:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596981', 'tblTempUsageDetail_20' ) start [2025-03-03 07:37:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596981', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:37:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:37:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:37:24] Production.INFO: ==25094== Releasing lock... [2025-03-03 07:37:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:37:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:38:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:38:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:38:16] Production.INFO: count ==409 [2025-03-03 07:38:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:38:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596986', 'tblTempUsageDetail_20' ) start [2025-03-03 07:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596986', 'tblTempUsageDetail_20' ) end [2025-03-03 07:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596986', 'tblTempVendorCDR_20' ) start [2025-03-03 07:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596986', 'tblTempVendorCDR_20' ) end [2025-03-03 07:38:16] Production.INFO: ProcessCDR(1,14596986,1,1,2) [2025-03-03 07:38:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596986,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:38:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596986,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:38:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596986,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:38:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596986,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:38:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596986', 'tblTempUsageDetail_20' ) start [2025-03-03 07:38:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596986', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:38:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:38:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:38:25] Production.INFO: ==25181== Releasing lock... [2025-03-03 07:38:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:38:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:39:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:39:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:39:16] Production.INFO: count ==409 [2025-03-03 07:39:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:39:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596991', 'tblTempUsageDetail_20' ) start [2025-03-03 07:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596991', 'tblTempUsageDetail_20' ) end [2025-03-03 07:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596991', 'tblTempVendorCDR_20' ) start [2025-03-03 07:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596991', 'tblTempVendorCDR_20' ) end [2025-03-03 07:39:17] Production.INFO: ProcessCDR(1,14596991,1,1,2) [2025-03-03 07:39:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596991,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:39:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596991,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:39:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596991,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:39:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596991,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:39:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596991', 'tblTempUsageDetail_20' ) start [2025-03-03 07:39:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596991', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:39:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:39:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:39:24] Production.INFO: ==25270== Releasing lock... [2025-03-03 07:39:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:39:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:40:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:40:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:40:16] Production.INFO: count ==409 [2025-03-03 07:40:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:40:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:40:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596997', 'tblTempUsageDetail_20' ) start [2025-03-03 07:40:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14596997', 'tblTempUsageDetail_20' ) end [2025-03-03 07:40:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596997', 'tblTempVendorCDR_20' ) start [2025-03-03 07:40:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14596997', 'tblTempVendorCDR_20' ) end [2025-03-03 07:40:16] Production.INFO: ProcessCDR(1,14596997,1,1,2) [2025-03-03 07:40:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14596997,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:40:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14596997,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:40:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14596997,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:40:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14596997,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:40:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14596997', 'tblTempUsageDetail_20' ) start [2025-03-03 07:40:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14596997', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:40:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:40:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:40:26] Production.INFO: ==25362== Releasing lock... [2025-03-03 07:40:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:40:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:41:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:41:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:41:16] Production.INFO: count ==409 [2025-03-03 07:41:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:41:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597002', 'tblTempUsageDetail_20' ) start [2025-03-03 07:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597002', 'tblTempUsageDetail_20' ) end [2025-03-03 07:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597002', 'tblTempVendorCDR_20' ) start [2025-03-03 07:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597002', 'tblTempVendorCDR_20' ) end [2025-03-03 07:41:16] Production.INFO: ProcessCDR(1,14597002,1,1,2) [2025-03-03 07:41:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597002,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:41:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597002,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:41:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597002,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:41:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597002,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:41:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597002', 'tblTempUsageDetail_20' ) start [2025-03-03 07:41:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597002', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:41:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:41:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:41:24] Production.INFO: ==25457== Releasing lock... [2025-03-03 07:41:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:41:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:42:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:42:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:42:16] Production.INFO: count ==409 [2025-03-03 07:42:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:42:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597007', 'tblTempUsageDetail_20' ) start [2025-03-03 07:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597007', 'tblTempUsageDetail_20' ) end [2025-03-03 07:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597007', 'tblTempVendorCDR_20' ) start [2025-03-03 07:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597007', 'tblTempVendorCDR_20' ) end [2025-03-03 07:42:16] Production.INFO: ProcessCDR(1,14597007,1,1,2) [2025-03-03 07:42:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597007,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:42:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597007,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:42:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597007,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:42:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597007,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:42:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597007', 'tblTempUsageDetail_20' ) start [2025-03-03 07:42:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597007', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:42:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:42:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:42:24] Production.INFO: ==25550== Releasing lock... [2025-03-03 07:42:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:42:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:43:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:43:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:43:16] Production.INFO: count ==409 [2025-03-03 07:43:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:43:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:43:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597012', 'tblTempUsageDetail_20' ) start [2025-03-03 07:43:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597012', 'tblTempUsageDetail_20' ) end [2025-03-03 07:43:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597012', 'tblTempVendorCDR_20' ) start [2025-03-03 07:43:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597012', 'tblTempVendorCDR_20' ) end [2025-03-03 07:43:16] Production.INFO: ProcessCDR(1,14597012,1,1,2) [2025-03-03 07:43:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597012,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:43:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597012,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:43:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597012,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:43:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597012,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:43:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597012', 'tblTempUsageDetail_20' ) start [2025-03-03 07:43:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597012', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:43:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:43:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:43:24] Production.INFO: ==25642== Releasing lock... [2025-03-03 07:43:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:43:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:44:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:44:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:44:16] Production.INFO: count ==409 [2025-03-03 07:44:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:44:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597017', 'tblTempUsageDetail_20' ) start [2025-03-03 07:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597017', 'tblTempUsageDetail_20' ) end [2025-03-03 07:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597017', 'tblTempVendorCDR_20' ) start [2025-03-03 07:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597017', 'tblTempVendorCDR_20' ) end [2025-03-03 07:44:16] Production.INFO: ProcessCDR(1,14597017,1,1,2) [2025-03-03 07:44:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597017,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:44:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597017,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:44:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597017,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:44:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597017,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597017', 'tblTempUsageDetail_20' ) start [2025-03-03 07:44:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597017', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:44:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:44:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:44:24] Production.INFO: ==25731== Releasing lock... [2025-03-03 07:44:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:44:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:45:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:45:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:45:16] Production.INFO: count ==409 [2025-03-03 07:45:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:45:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597022', 'tblTempUsageDetail_20' ) start [2025-03-03 07:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597022', 'tblTempUsageDetail_20' ) end [2025-03-03 07:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597022', 'tblTempVendorCDR_20' ) start [2025-03-03 07:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597022', 'tblTempVendorCDR_20' ) end [2025-03-03 07:45:17] Production.INFO: ProcessCDR(1,14597022,1,1,2) [2025-03-03 07:45:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597022,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:45:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597022,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:45:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597022,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:45:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597022,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:45:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597022', 'tblTempUsageDetail_20' ) start [2025-03-03 07:45:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597022', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:45:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:45:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:45:24] Production.INFO: ==25818== Releasing lock... [2025-03-03 07:45:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:45:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:46:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:46:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:46:16] Production.INFO: count ==409 [2025-03-03 07:46:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:46:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:46:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597027', 'tblTempUsageDetail_20' ) start [2025-03-03 07:46:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597027', 'tblTempUsageDetail_20' ) end [2025-03-03 07:46:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597027', 'tblTempVendorCDR_20' ) start [2025-03-03 07:46:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597027', 'tblTempVendorCDR_20' ) end [2025-03-03 07:46:16] Production.INFO: ProcessCDR(1,14597027,1,1,2) [2025-03-03 07:46:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597027,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:46:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597027,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:46:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597027,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:46:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597027,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597027', 'tblTempUsageDetail_20' ) start [2025-03-03 07:46:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597027', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:46:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:46:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:46:23] Production.INFO: ==25908== Releasing lock... [2025-03-03 07:46:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:46:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:47:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:47:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:47:16] Production.INFO: count ==409 [2025-03-03 07:47:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:47:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597032', 'tblTempUsageDetail_20' ) start [2025-03-03 07:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597032', 'tblTempUsageDetail_20' ) end [2025-03-03 07:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597032', 'tblTempVendorCDR_20' ) start [2025-03-03 07:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597032', 'tblTempVendorCDR_20' ) end [2025-03-03 07:47:16] Production.INFO: ProcessCDR(1,14597032,1,1,2) [2025-03-03 07:47:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597032,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:47:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597032,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:47:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597032,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:47:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597032,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:47:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597032', 'tblTempUsageDetail_20' ) start [2025-03-03 07:47:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597032', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:47:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:47:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:47:24] Production.INFO: ==25997== Releasing lock... [2025-03-03 07:47:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:47:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:48:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:48:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:48:16] Production.INFO: count ==409 [2025-03-03 07:48:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:48:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597037', 'tblTempUsageDetail_20' ) start [2025-03-03 07:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597037', 'tblTempUsageDetail_20' ) end [2025-03-03 07:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597037', 'tblTempVendorCDR_20' ) start [2025-03-03 07:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597037', 'tblTempVendorCDR_20' ) end [2025-03-03 07:48:16] Production.INFO: ProcessCDR(1,14597037,1,1,2) [2025-03-03 07:48:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597037,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:48:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597037,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:48:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597037,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:48:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597037,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:48:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597037', 'tblTempUsageDetail_20' ) start [2025-03-03 07:48:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597037', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:48:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:48:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:48:24] Production.INFO: ==26087== Releasing lock... [2025-03-03 07:48:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:48:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:49:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:49:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:49:16] Production.INFO: count ==409 [2025-03-03 07:49:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:49:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597042', 'tblTempUsageDetail_20' ) start [2025-03-03 07:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597042', 'tblTempUsageDetail_20' ) end [2025-03-03 07:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597042', 'tblTempVendorCDR_20' ) start [2025-03-03 07:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597042', 'tblTempVendorCDR_20' ) end [2025-03-03 07:49:16] Production.INFO: ProcessCDR(1,14597042,1,1,2) [2025-03-03 07:49:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597042,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:49:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597042,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:49:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597042,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:49:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597042,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:49:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597042', 'tblTempUsageDetail_20' ) start [2025-03-03 07:49:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597042', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:49:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:49:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:49:24] Production.INFO: ==26179== Releasing lock... [2025-03-03 07:49:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:49:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:50:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:50:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:50:17] Production.INFO: count ==409 [2025-03-03 07:50:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:50:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597048', 'tblTempUsageDetail_20' ) start [2025-03-03 07:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597048', 'tblTempUsageDetail_20' ) end [2025-03-03 07:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597048', 'tblTempVendorCDR_20' ) start [2025-03-03 07:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597048', 'tblTempVendorCDR_20' ) end [2025-03-03 07:50:17] Production.INFO: ProcessCDR(1,14597048,1,1,2) [2025-03-03 07:50:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597048,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:50:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597048,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:50:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597048,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:50:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597048,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:50:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597048', 'tblTempUsageDetail_20' ) start [2025-03-03 07:50:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597048', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:50:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:50:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:50:25] Production.INFO: ==26308== Releasing lock... [2025-03-03 07:50:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:50:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:51:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:51:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:51:16] Production.INFO: count ==409 [2025-03-03 07:51:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:51:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597053', 'tblTempUsageDetail_20' ) start [2025-03-03 07:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597053', 'tblTempUsageDetail_20' ) end [2025-03-03 07:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597053', 'tblTempVendorCDR_20' ) start [2025-03-03 07:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597053', 'tblTempVendorCDR_20' ) end [2025-03-03 07:51:16] Production.INFO: ProcessCDR(1,14597053,1,1,2) [2025-03-03 07:51:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597053,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:51:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597053,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:51:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597053,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:51:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597053,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:51:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597053', 'tblTempUsageDetail_20' ) start [2025-03-03 07:51:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597053', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:51:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:51:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:51:24] Production.INFO: ==26399== Releasing lock... [2025-03-03 07:51:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:51:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:52:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:52:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:52:17] Production.INFO: count ==409 [2025-03-03 07:52:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:52:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597058', 'tblTempUsageDetail_20' ) start [2025-03-03 07:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597058', 'tblTempUsageDetail_20' ) end [2025-03-03 07:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597058', 'tblTempVendorCDR_20' ) start [2025-03-03 07:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597058', 'tblTempVendorCDR_20' ) end [2025-03-03 07:52:17] Production.INFO: ProcessCDR(1,14597058,1,1,2) [2025-03-03 07:52:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597058,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:52:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597058,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:52:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597058,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:52:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597058,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:52:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597058', 'tblTempUsageDetail_20' ) start [2025-03-03 07:52:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597058', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:52:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:52:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:52:24] Production.INFO: ==26484== Releasing lock... [2025-03-03 07:52:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:52:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:53:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:53:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:53:16] Production.INFO: count ==409 [2025-03-03 07:53:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:53:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597063', 'tblTempUsageDetail_20' ) start [2025-03-03 07:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597063', 'tblTempUsageDetail_20' ) end [2025-03-03 07:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597063', 'tblTempVendorCDR_20' ) start [2025-03-03 07:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597063', 'tblTempVendorCDR_20' ) end [2025-03-03 07:53:17] Production.INFO: ProcessCDR(1,14597063,1,1,2) [2025-03-03 07:53:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597063,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:53:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597063,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:53:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597063,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:53:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597063,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:53:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597063', 'tblTempUsageDetail_20' ) start [2025-03-03 07:53:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597063', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:53:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:53:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:53:24] Production.INFO: ==26567== Releasing lock... [2025-03-03 07:53:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:53:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:54:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:54:17] Production.INFO: count ==409 [2025-03-03 07:54:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:54:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597068', 'tblTempUsageDetail_20' ) start [2025-03-03 07:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597068', 'tblTempUsageDetail_20' ) end [2025-03-03 07:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597068', 'tblTempVendorCDR_20' ) start [2025-03-03 07:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597068', 'tblTempVendorCDR_20' ) end [2025-03-03 07:54:17] Production.INFO: ProcessCDR(1,14597068,1,1,2) [2025-03-03 07:54:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597068,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:54:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597068,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:54:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597068,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:54:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597068,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:54:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597068', 'tblTempUsageDetail_20' ) start [2025-03-03 07:54:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597068', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:54:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:54:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:54:24] Production.INFO: ==26651== Releasing lock... [2025-03-03 07:54:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:54:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:55:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:55:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:55:16] Production.INFO: count ==409 [2025-03-03 07:55:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:55:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597073', 'tblTempUsageDetail_20' ) start [2025-03-03 07:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597073', 'tblTempUsageDetail_20' ) end [2025-03-03 07:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597073', 'tblTempVendorCDR_20' ) start [2025-03-03 07:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597073', 'tblTempVendorCDR_20' ) end [2025-03-03 07:55:16] Production.INFO: ProcessCDR(1,14597073,1,1,2) [2025-03-03 07:55:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597073,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:55:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597073,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:55:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597073,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:55:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597073,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:55:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597073', 'tblTempUsageDetail_20' ) start [2025-03-03 07:55:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597073', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:55:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:55:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:55:25] Production.INFO: ==26736== Releasing lock... [2025-03-03 07:55:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:55:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:56:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:56:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:56:17] Production.INFO: count ==409 [2025-03-03 07:56:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:56:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597078', 'tblTempUsageDetail_20' ) start [2025-03-03 07:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597078', 'tblTempUsageDetail_20' ) end [2025-03-03 07:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597078', 'tblTempVendorCDR_20' ) start [2025-03-03 07:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597078', 'tblTempVendorCDR_20' ) end [2025-03-03 07:56:17] Production.INFO: ProcessCDR(1,14597078,1,1,2) [2025-03-03 07:56:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597078,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:56:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597078,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:56:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597078,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:56:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597078,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:56:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597078', 'tblTempUsageDetail_20' ) start [2025-03-03 07:56:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597078', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:56:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:56:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:56:25] Production.INFO: ==26827== Releasing lock... [2025-03-03 07:56:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:56:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:57:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:57:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:57:16] Production.INFO: count ==409 [2025-03-03 07:57:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:57:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597083', 'tblTempUsageDetail_20' ) start [2025-03-03 07:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597083', 'tblTempUsageDetail_20' ) end [2025-03-03 07:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597083', 'tblTempVendorCDR_20' ) start [2025-03-03 07:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597083', 'tblTempVendorCDR_20' ) end [2025-03-03 07:57:16] Production.INFO: ProcessCDR(1,14597083,1,1,2) [2025-03-03 07:57:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597083,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:57:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597083,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:57:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597083,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:57:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597083,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:57:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597083', 'tblTempUsageDetail_20' ) start [2025-03-03 07:57:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597083', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:57:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:57:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:57:24] Production.INFO: ==26913== Releasing lock... [2025-03-03 07:57:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:57:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:58:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:58:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:58:16] Production.INFO: count ==409 [2025-03-03 07:58:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:58:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597088', 'tblTempUsageDetail_20' ) start [2025-03-03 07:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597088', 'tblTempUsageDetail_20' ) end [2025-03-03 07:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597088', 'tblTempVendorCDR_20' ) start [2025-03-03 07:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597088', 'tblTempVendorCDR_20' ) end [2025-03-03 07:58:17] Production.INFO: ProcessCDR(1,14597088,1,1,2) [2025-03-03 07:58:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597088,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:58:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597088,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:58:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597088,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:58:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597088,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:58:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597088', 'tblTempUsageDetail_20' ) start [2025-03-03 07:58:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597088', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:58:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:58:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:58:25] Production.INFO: ==26996== Releasing lock... [2025-03-03 07:58:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:58:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 07:59:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 07:59:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 07:59:16] Production.INFO: count ==409 [2025-03-03 07:59:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 07:59:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 07:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597093', 'tblTempUsageDetail_20' ) start [2025-03-03 07:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597093', 'tblTempUsageDetail_20' ) end [2025-03-03 07:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597093', 'tblTempVendorCDR_20' ) start [2025-03-03 07:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597093', 'tblTempVendorCDR_20' ) end [2025-03-03 07:59:16] Production.INFO: ProcessCDR(1,14597093,1,1,2) [2025-03-03 07:59:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597093,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:59:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597093,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 07:59:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597093,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:59:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597093,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 07:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597093', 'tblTempUsageDetail_20' ) start [2025-03-03 07:59:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597093', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 07:59:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 07:59:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 07:59:24] Production.INFO: ==27081== Releasing lock... [2025-03-03 07:59:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 07:59:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:00:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:00:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:00:17] Production.INFO: count ==409 [2025-03-03 08:00:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:00:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597098', 'tblTempUsageDetail_20' ) start [2025-03-03 08:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597098', 'tblTempUsageDetail_20' ) end [2025-03-03 08:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597098', 'tblTempVendorCDR_20' ) start [2025-03-03 08:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597098', 'tblTempVendorCDR_20' ) end [2025-03-03 08:00:17] Production.INFO: ProcessCDR(1,14597098,1,1,2) [2025-03-03 08:00:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597098,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:00:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597098,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:00:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597098,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:00:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597098,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:00:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597098', 'tblTempUsageDetail_20' ) start [2025-03-03 08:00:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597098', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:00:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:00:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:00:25] Production.INFO: ==27174== Releasing lock... [2025-03-03 08:00:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:00:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:01:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:01:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:01:16] Production.INFO: count ==409 [2025-03-03 08:01:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:01:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597104', 'tblTempUsageDetail_20' ) start [2025-03-03 08:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597104', 'tblTempUsageDetail_20' ) end [2025-03-03 08:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597104', 'tblTempVendorCDR_20' ) start [2025-03-03 08:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597104', 'tblTempVendorCDR_20' ) end [2025-03-03 08:01:16] Production.INFO: ProcessCDR(1,14597104,1,1,2) [2025-03-03 08:01:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597104,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:01:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597104,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:01:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597104,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:01:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597104,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:01:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597104', 'tblTempUsageDetail_20' ) start [2025-03-03 08:01:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597104', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:01:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:01:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:01:24] Production.INFO: ==27271== Releasing lock... [2025-03-03 08:01:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:01:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:02:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:02:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:02:17] Production.INFO: count ==409 [2025-03-03 08:02:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:02:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597109', 'tblTempUsageDetail_20' ) start [2025-03-03 08:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597109', 'tblTempUsageDetail_20' ) end [2025-03-03 08:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597109', 'tblTempVendorCDR_20' ) start [2025-03-03 08:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597109', 'tblTempVendorCDR_20' ) end [2025-03-03 08:02:17] Production.INFO: ProcessCDR(1,14597109,1,1,2) [2025-03-03 08:02:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597109,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:02:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597109,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:02:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597109,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:02:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597109,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:02:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597109', 'tblTempUsageDetail_20' ) start [2025-03-03 08:02:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597109', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:02:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:02:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:02:24] Production.INFO: ==27356== Releasing lock... [2025-03-03 08:02:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:02:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:03:03] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:03:03] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:03:15] Production.INFO: count ==409 [2025-03-03 08:03:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:03:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:03:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597114', 'tblTempUsageDetail_20' ) start [2025-03-03 08:03:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597114', 'tblTempUsageDetail_20' ) end [2025-03-03 08:03:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597114', 'tblTempVendorCDR_20' ) start [2025-03-03 08:03:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597114', 'tblTempVendorCDR_20' ) end [2025-03-03 08:03:16] Production.INFO: ProcessCDR(1,14597114,1,1,2) [2025-03-03 08:03:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597114,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:03:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597114,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:03:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597114,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:03:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597114,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:03:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597114', 'tblTempUsageDetail_20' ) start [2025-03-03 08:03:22] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597114', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:03:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:03:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:03:23] Production.INFO: ==27443== Releasing lock... [2025-03-03 08:03:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:03:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:04:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:04:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:04:16] Production.INFO: count ==409 [2025-03-03 08:04:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:04:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:04:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597119', 'tblTempUsageDetail_20' ) start [2025-03-03 08:04:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597119', 'tblTempUsageDetail_20' ) end [2025-03-03 08:04:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597119', 'tblTempVendorCDR_20' ) start [2025-03-03 08:04:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597119', 'tblTempVendorCDR_20' ) end [2025-03-03 08:04:16] Production.INFO: ProcessCDR(1,14597119,1,1,2) [2025-03-03 08:04:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597119,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:04:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597119,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:04:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597119,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:04:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597119,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:04:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597119', 'tblTempUsageDetail_20' ) start [2025-03-03 08:04:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597119', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:04:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:04:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:04:25] Production.INFO: ==27527== Releasing lock... [2025-03-03 08:04:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:04:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:05:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:05:16] Production.INFO: count ==409 [2025-03-03 08:05:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:05:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597124', 'tblTempUsageDetail_20' ) start [2025-03-03 08:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597124', 'tblTempUsageDetail_20' ) end [2025-03-03 08:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597124', 'tblTempVendorCDR_20' ) start [2025-03-03 08:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597124', 'tblTempVendorCDR_20' ) end [2025-03-03 08:05:17] Production.INFO: ProcessCDR(1,14597124,1,1,2) [2025-03-03 08:05:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597124,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:05:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597124,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:05:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597124,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:05:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597124,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:05:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597124', 'tblTempUsageDetail_20' ) start [2025-03-03 08:05:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597124', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:05:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:05:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:05:24] Production.INFO: ==27654== Releasing lock... [2025-03-03 08:05:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:05:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:06:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:06:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:06:16] Production.INFO: count ==409 [2025-03-03 08:06:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:06:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597129', 'tblTempUsageDetail_20' ) start [2025-03-03 08:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597129', 'tblTempUsageDetail_20' ) end [2025-03-03 08:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597129', 'tblTempVendorCDR_20' ) start [2025-03-03 08:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597129', 'tblTempVendorCDR_20' ) end [2025-03-03 08:06:17] Production.INFO: ProcessCDR(1,14597129,1,1,2) [2025-03-03 08:06:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597129,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:06:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597129,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:06:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597129,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:06:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597129,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:06:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597129', 'tblTempUsageDetail_20' ) start [2025-03-03 08:06:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597129', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:06:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:06:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:06:24] Production.INFO: ==27747== Releasing lock... [2025-03-03 08:06:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:06:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:07:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:07:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:07:17] Production.INFO: count ==409 [2025-03-03 08:07:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:07:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597134', 'tblTempUsageDetail_20' ) start [2025-03-03 08:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597134', 'tblTempUsageDetail_20' ) end [2025-03-03 08:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597134', 'tblTempVendorCDR_20' ) start [2025-03-03 08:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597134', 'tblTempVendorCDR_20' ) end [2025-03-03 08:07:17] Production.INFO: ProcessCDR(1,14597134,1,1,2) [2025-03-03 08:07:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597134,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:07:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597134,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:07:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597134,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:07:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597134,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:07:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597134', 'tblTempUsageDetail_20' ) start [2025-03-03 08:07:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597134', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:07:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:07:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:07:24] Production.INFO: ==27838== Releasing lock... [2025-03-03 08:07:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:07:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:08:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:08:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:08:16] Production.INFO: count ==409 [2025-03-03 08:08:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:08:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597139', 'tblTempUsageDetail_20' ) start [2025-03-03 08:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597139', 'tblTempUsageDetail_20' ) end [2025-03-03 08:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597139', 'tblTempVendorCDR_20' ) start [2025-03-03 08:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597139', 'tblTempVendorCDR_20' ) end [2025-03-03 08:08:16] Production.INFO: ProcessCDR(1,14597139,1,1,2) [2025-03-03 08:08:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597139,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:08:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597139,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:08:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597139,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:08:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597139,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:08:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597139', 'tblTempUsageDetail_20' ) start [2025-03-03 08:08:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597139', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:08:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:08:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:08:24] Production.INFO: ==27929== Releasing lock... [2025-03-03 08:08:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:08:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:09:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:09:17] Production.INFO: count ==409 [2025-03-03 08:09:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:09:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597144', 'tblTempUsageDetail_20' ) start [2025-03-03 08:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597144', 'tblTempUsageDetail_20' ) end [2025-03-03 08:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597144', 'tblTempVendorCDR_20' ) start [2025-03-03 08:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597144', 'tblTempVendorCDR_20' ) end [2025-03-03 08:09:17] Production.INFO: ProcessCDR(1,14597144,1,1,2) [2025-03-03 08:09:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597144,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:09:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597144,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:09:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597144,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:09:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597144,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:09:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597144', 'tblTempUsageDetail_20' ) start [2025-03-03 08:09:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597144', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:09:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:09:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:09:25] Production.INFO: ==28029== Releasing lock... [2025-03-03 08:09:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:09:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:10:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:10:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:10:17] Production.INFO: count ==409 [2025-03-03 08:10:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:10:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597150', 'tblTempUsageDetail_20' ) start [2025-03-03 08:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597150', 'tblTempUsageDetail_20' ) end [2025-03-03 08:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597150', 'tblTempVendorCDR_20' ) start [2025-03-03 08:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597150', 'tblTempVendorCDR_20' ) end [2025-03-03 08:10:17] Production.INFO: ProcessCDR(1,14597150,1,1,2) [2025-03-03 08:10:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597150,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:10:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597150,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:10:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597150,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:10:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597150,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:10:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597150', 'tblTempUsageDetail_20' ) start [2025-03-03 08:10:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597150', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:10:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:10:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:10:25] Production.INFO: ==28124== Releasing lock... [2025-03-03 08:10:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:10:25] Production.INFO: 33.5 MB #Memory Used# [2025-03-03 08:11:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:11:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:11:16] Production.INFO: count ==409 [2025-03-03 08:11:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:11:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:11:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597155', 'tblTempUsageDetail_20' ) start [2025-03-03 08:11:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597155', 'tblTempUsageDetail_20' ) end [2025-03-03 08:11:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597155', 'tblTempVendorCDR_20' ) start [2025-03-03 08:11:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597155', 'tblTempVendorCDR_20' ) end [2025-03-03 08:11:16] Production.INFO: ProcessCDR(1,14597155,1,1,2) [2025-03-03 08:11:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597155,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:11:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597155,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:11:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597155,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:11:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597155,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:11:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597155', 'tblTempUsageDetail_20' ) start [2025-03-03 08:11:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597155', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:11:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:11:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:11:24] Production.INFO: ==28217== Releasing lock... [2025-03-03 08:11:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:11:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:12:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:12:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:12:16] Production.INFO: count ==409 [2025-03-03 08:12:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:12:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597160', 'tblTempUsageDetail_20' ) start [2025-03-03 08:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597160', 'tblTempUsageDetail_20' ) end [2025-03-03 08:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597160', 'tblTempVendorCDR_20' ) start [2025-03-03 08:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597160', 'tblTempVendorCDR_20' ) end [2025-03-03 08:12:16] Production.INFO: ProcessCDR(1,14597160,1,1,2) [2025-03-03 08:12:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597160,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:12:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597160,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:12:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597160,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:12:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597160,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:12:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597160', 'tblTempUsageDetail_20' ) start [2025-03-03 08:12:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597160', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:12:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:12:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:12:23] Production.INFO: ==28305== Releasing lock... [2025-03-03 08:12:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:12:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:13:17] Production.INFO: count ==409 [2025-03-03 08:13:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:13:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597165', 'tblTempUsageDetail_20' ) start [2025-03-03 08:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597165', 'tblTempUsageDetail_20' ) end [2025-03-03 08:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597165', 'tblTempVendorCDR_20' ) start [2025-03-03 08:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597165', 'tblTempVendorCDR_20' ) end [2025-03-03 08:13:17] Production.INFO: ProcessCDR(1,14597165,1,1,2) [2025-03-03 08:13:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597165,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:13:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597165,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:13:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597165,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:13:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597165,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:13:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597165', 'tblTempUsageDetail_20' ) start [2025-03-03 08:13:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597165', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:13:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:13:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:13:25] Production.INFO: ==28402== Releasing lock... [2025-03-03 08:13:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:13:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:14:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:14:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:14:16] Production.INFO: count ==409 [2025-03-03 08:14:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:14:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:14:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597170', 'tblTempUsageDetail_20' ) start [2025-03-03 08:14:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597170', 'tblTempUsageDetail_20' ) end [2025-03-03 08:14:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597170', 'tblTempVendorCDR_20' ) start [2025-03-03 08:14:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597170', 'tblTempVendorCDR_20' ) end [2025-03-03 08:14:16] Production.INFO: ProcessCDR(1,14597170,1,1,2) [2025-03-03 08:14:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597170,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:14:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597170,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:14:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597170,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:14:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597170,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:14:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597170', 'tblTempUsageDetail_20' ) start [2025-03-03 08:14:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597170', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:14:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:14:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:14:24] Production.INFO: ==28498== Releasing lock... [2025-03-03 08:14:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:14:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:15:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:15:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:15:16] Production.INFO: count ==409 [2025-03-03 08:15:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:15:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597175', 'tblTempUsageDetail_20' ) start [2025-03-03 08:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597175', 'tblTempUsageDetail_20' ) end [2025-03-03 08:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597175', 'tblTempVendorCDR_20' ) start [2025-03-03 08:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597175', 'tblTempVendorCDR_20' ) end [2025-03-03 08:15:16] Production.INFO: ProcessCDR(1,14597175,1,1,2) [2025-03-03 08:15:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597175,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:15:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597175,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:15:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597175,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:15:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597175,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:15:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597175', 'tblTempUsageDetail_20' ) start [2025-03-03 08:15:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597175', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:15:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:15:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:15:25] Production.INFO: ==28584== Releasing lock... [2025-03-03 08:15:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:15:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:16:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:16:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:16:16] Production.INFO: count ==409 [2025-03-03 08:16:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:16:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597180', 'tblTempUsageDetail_20' ) start [2025-03-03 08:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597180', 'tblTempUsageDetail_20' ) end [2025-03-03 08:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597180', 'tblTempVendorCDR_20' ) start [2025-03-03 08:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597180', 'tblTempVendorCDR_20' ) end [2025-03-03 08:16:16] Production.INFO: ProcessCDR(1,14597180,1,1,2) [2025-03-03 08:16:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597180,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:16:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597180,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:16:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597180,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:16:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597180,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597180', 'tblTempUsageDetail_20' ) start [2025-03-03 08:16:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597180', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:16:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:16:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:16:24] Production.INFO: ==28675== Releasing lock... [2025-03-03 08:16:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:16:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:17:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:17:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:17:16] Production.INFO: count ==409 [2025-03-03 08:17:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:17:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597185', 'tblTempUsageDetail_20' ) start [2025-03-03 08:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597185', 'tblTempUsageDetail_20' ) end [2025-03-03 08:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597185', 'tblTempVendorCDR_20' ) start [2025-03-03 08:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597185', 'tblTempVendorCDR_20' ) end [2025-03-03 08:17:17] Production.INFO: ProcessCDR(1,14597185,1,1,2) [2025-03-03 08:17:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597185,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:17:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597185,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:17:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597185,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:17:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597185,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:17:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597185', 'tblTempUsageDetail_20' ) start [2025-03-03 08:17:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597185', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:17:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:17:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:17:25] Production.INFO: ==28766== Releasing lock... [2025-03-03 08:17:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:17:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:18:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:18:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:18:16] Production.INFO: count ==409 [2025-03-03 08:18:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:18:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597190', 'tblTempUsageDetail_20' ) start [2025-03-03 08:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597190', 'tblTempUsageDetail_20' ) end [2025-03-03 08:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597190', 'tblTempVendorCDR_20' ) start [2025-03-03 08:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597190', 'tblTempVendorCDR_20' ) end [2025-03-03 08:18:17] Production.INFO: ProcessCDR(1,14597190,1,1,2) [2025-03-03 08:18:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597190,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:18:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597190,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:18:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597190,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:18:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597190,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597190', 'tblTempUsageDetail_20' ) start [2025-03-03 08:18:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597190', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:18:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:18:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:18:24] Production.INFO: ==28873== Releasing lock... [2025-03-03 08:18:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:18:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:19:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:19:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:19:16] Production.INFO: count ==409 [2025-03-03 08:19:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:19:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597195', 'tblTempUsageDetail_20' ) start [2025-03-03 08:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597195', 'tblTempUsageDetail_20' ) end [2025-03-03 08:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597195', 'tblTempVendorCDR_20' ) start [2025-03-03 08:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597195', 'tblTempVendorCDR_20' ) end [2025-03-03 08:19:16] Production.INFO: ProcessCDR(1,14597195,1,1,2) [2025-03-03 08:19:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597195,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:19:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597195,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:19:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597195,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:19:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597195,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:19:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597195', 'tblTempUsageDetail_20' ) start [2025-03-03 08:19:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597195', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:19:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:19:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:19:24] Production.INFO: ==28968== Releasing lock... [2025-03-03 08:19:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:19:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:20:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:20:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:20:17] Production.INFO: count ==409 [2025-03-03 08:20:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:20:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597201', 'tblTempUsageDetail_20' ) start [2025-03-03 08:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597201', 'tblTempUsageDetail_20' ) end [2025-03-03 08:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597201', 'tblTempVendorCDR_20' ) start [2025-03-03 08:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597201', 'tblTempVendorCDR_20' ) end [2025-03-03 08:20:17] Production.INFO: ProcessCDR(1,14597201,1,1,2) [2025-03-03 08:20:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597201,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:20:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597201,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:20:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597201,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:20:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597201,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597201', 'tblTempUsageDetail_20' ) start [2025-03-03 08:20:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597201', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:20:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:20:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:20:25] Production.INFO: ==29054== Releasing lock... [2025-03-03 08:20:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:20:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:21:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:21:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:21:16] Production.INFO: count ==409 [2025-03-03 08:21:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:21:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597206', 'tblTempUsageDetail_20' ) start [2025-03-03 08:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597206', 'tblTempUsageDetail_20' ) end [2025-03-03 08:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597206', 'tblTempVendorCDR_20' ) start [2025-03-03 08:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597206', 'tblTempVendorCDR_20' ) end [2025-03-03 08:21:16] Production.INFO: ProcessCDR(1,14597206,1,1,2) [2025-03-03 08:21:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597206,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:21:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597206,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:21:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597206,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:21:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597206,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:21:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597206', 'tblTempUsageDetail_20' ) start [2025-03-03 08:21:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597206', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:21:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:21:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:21:24] Production.INFO: ==29190== Releasing lock... [2025-03-03 08:21:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:21:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:22:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:22:17] Production.INFO: count ==409 [2025-03-03 08:22:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:22:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597211', 'tblTempUsageDetail_20' ) start [2025-03-03 08:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597211', 'tblTempUsageDetail_20' ) end [2025-03-03 08:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597211', 'tblTempVendorCDR_20' ) start [2025-03-03 08:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597211', 'tblTempVendorCDR_20' ) end [2025-03-03 08:22:17] Production.INFO: ProcessCDR(1,14597211,1,1,2) [2025-03-03 08:22:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597211,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:22:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597211,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:22:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597211,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:22:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597211,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:22:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597211', 'tblTempUsageDetail_20' ) start [2025-03-03 08:22:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597211', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:22:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:22:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:22:25] Production.INFO: ==29283== Releasing lock... [2025-03-03 08:22:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:22:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:23:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:23:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:23:16] Production.INFO: count ==409 [2025-03-03 08:23:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:23:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597216', 'tblTempUsageDetail_20' ) start [2025-03-03 08:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597216', 'tblTempUsageDetail_20' ) end [2025-03-03 08:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597216', 'tblTempVendorCDR_20' ) start [2025-03-03 08:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597216', 'tblTempVendorCDR_20' ) end [2025-03-03 08:23:16] Production.INFO: ProcessCDR(1,14597216,1,1,2) [2025-03-03 08:23:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597216,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:23:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597216,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:23:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597216,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:23:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597216,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:23:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597216', 'tblTempUsageDetail_20' ) start [2025-03-03 08:23:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597216', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:23:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:23:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:23:24] Production.INFO: ==29375== Releasing lock... [2025-03-03 08:23:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:23:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:24:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:24:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:24:17] Production.INFO: count ==409 [2025-03-03 08:24:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:24:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597221', 'tblTempUsageDetail_20' ) start [2025-03-03 08:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597221', 'tblTempUsageDetail_20' ) end [2025-03-03 08:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597221', 'tblTempVendorCDR_20' ) start [2025-03-03 08:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597221', 'tblTempVendorCDR_20' ) end [2025-03-03 08:24:17] Production.INFO: ProcessCDR(1,14597221,1,1,2) [2025-03-03 08:24:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597221,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:24:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597221,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:24:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597221,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:24:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597221,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:24:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597221', 'tblTempUsageDetail_20' ) start [2025-03-03 08:24:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597221', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:24:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:24:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:24:25] Production.INFO: ==29474== Releasing lock... [2025-03-03 08:24:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:24:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:25:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:25:17] Production.INFO: count ==409 [2025-03-03 08:25:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:25:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597226', 'tblTempUsageDetail_20' ) start [2025-03-03 08:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597226', 'tblTempUsageDetail_20' ) end [2025-03-03 08:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597226', 'tblTempVendorCDR_20' ) start [2025-03-03 08:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597226', 'tblTempVendorCDR_20' ) end [2025-03-03 08:25:17] Production.INFO: ProcessCDR(1,14597226,1,1,2) [2025-03-03 08:25:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597226,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:25:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597226,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:25:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597226,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:25:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597226,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:25:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597226', 'tblTempUsageDetail_20' ) start [2025-03-03 08:25:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597226', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:25:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:25:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:25:24] Production.INFO: ==29567== Releasing lock... [2025-03-03 08:25:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:25:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:26:17] Production.INFO: count ==409 [2025-03-03 08:26:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:26:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597231', 'tblTempUsageDetail_20' ) start [2025-03-03 08:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597231', 'tblTempUsageDetail_20' ) end [2025-03-03 08:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597231', 'tblTempVendorCDR_20' ) start [2025-03-03 08:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597231', 'tblTempVendorCDR_20' ) end [2025-03-03 08:26:17] Production.INFO: ProcessCDR(1,14597231,1,1,2) [2025-03-03 08:26:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597231,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:26:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597231,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:26:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597231,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:26:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597231,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:26:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597231', 'tblTempUsageDetail_20' ) start [2025-03-03 08:26:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597231', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:26:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:26:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:26:25] Production.INFO: ==29658== Releasing lock... [2025-03-03 08:26:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:26:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:27:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:27:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:27:16] Production.INFO: count ==409 [2025-03-03 08:27:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:27:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597236', 'tblTempUsageDetail_20' ) start [2025-03-03 08:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597236', 'tblTempUsageDetail_20' ) end [2025-03-03 08:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597236', 'tblTempVendorCDR_20' ) start [2025-03-03 08:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597236', 'tblTempVendorCDR_20' ) end [2025-03-03 08:27:16] Production.INFO: ProcessCDR(1,14597236,1,1,2) [2025-03-03 08:27:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597236,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:27:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597236,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:27:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597236,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:27:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597236,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:27:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597236', 'tblTempUsageDetail_20' ) start [2025-03-03 08:27:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597236', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:27:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:27:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:27:23] Production.INFO: ==29753== Releasing lock... [2025-03-03 08:27:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:27:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:28:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:28:17] Production.INFO: count ==409 [2025-03-03 08:28:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:28:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597241', 'tblTempUsageDetail_20' ) start [2025-03-03 08:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597241', 'tblTempUsageDetail_20' ) end [2025-03-03 08:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597241', 'tblTempVendorCDR_20' ) start [2025-03-03 08:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597241', 'tblTempVendorCDR_20' ) end [2025-03-03 08:28:17] Production.INFO: ProcessCDR(1,14597241,1,1,2) [2025-03-03 08:28:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597241,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:28:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597241,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:28:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597241,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:28:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597241,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:28:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597241', 'tblTempUsageDetail_20' ) start [2025-03-03 08:28:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597241', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:28:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:28:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:28:24] Production.INFO: ==29853== Releasing lock... [2025-03-03 08:28:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:28:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:29:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:29:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:29:16] Production.INFO: count ==409 [2025-03-03 08:29:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:29:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597246', 'tblTempUsageDetail_20' ) start [2025-03-03 08:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597246', 'tblTempUsageDetail_20' ) end [2025-03-03 08:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597246', 'tblTempVendorCDR_20' ) start [2025-03-03 08:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597246', 'tblTempVendorCDR_20' ) end [2025-03-03 08:29:16] Production.INFO: ProcessCDR(1,14597246,1,1,2) [2025-03-03 08:29:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597246,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:29:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597246,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:29:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597246,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:29:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597246,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:29:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597246', 'tblTempUsageDetail_20' ) start [2025-03-03 08:29:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597246', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:29:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:29:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:29:23] Production.INFO: ==29951== Releasing lock... [2025-03-03 08:29:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:29:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:30:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:30:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:30:17] Production.INFO: count ==409 [2025-03-03 08:30:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:30:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597252', 'tblTempUsageDetail_20' ) start [2025-03-03 08:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597252', 'tblTempUsageDetail_20' ) end [2025-03-03 08:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597252', 'tblTempVendorCDR_20' ) start [2025-03-03 08:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597252', 'tblTempVendorCDR_20' ) end [2025-03-03 08:30:17] Production.INFO: ProcessCDR(1,14597252,1,1,2) [2025-03-03 08:30:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597252,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:30:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597252,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:30:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597252,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:30:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597252,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:30:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597252', 'tblTempUsageDetail_20' ) start [2025-03-03 08:30:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597252', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:30:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:30:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:30:25] Production.INFO: ==30048== Releasing lock... [2025-03-03 08:30:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:30:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:31:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:31:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:31:16] Production.INFO: count ==409 [2025-03-03 08:31:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:31:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597257', 'tblTempUsageDetail_20' ) start [2025-03-03 08:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597257', 'tblTempUsageDetail_20' ) end [2025-03-03 08:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597257', 'tblTempVendorCDR_20' ) start [2025-03-03 08:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597257', 'tblTempVendorCDR_20' ) end [2025-03-03 08:31:16] Production.INFO: ProcessCDR(1,14597257,1,1,2) [2025-03-03 08:31:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597257,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:31:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597257,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:31:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597257,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:31:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597257,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:31:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597257', 'tblTempUsageDetail_20' ) start [2025-03-03 08:31:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597257', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:31:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:31:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:31:24] Production.INFO: ==30139== Releasing lock... [2025-03-03 08:31:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:31:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:32:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:32:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:32:16] Production.INFO: count ==409 [2025-03-03 08:32:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:32:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597262', 'tblTempUsageDetail_20' ) start [2025-03-03 08:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597262', 'tblTempUsageDetail_20' ) end [2025-03-03 08:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597262', 'tblTempVendorCDR_20' ) start [2025-03-03 08:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597262', 'tblTempVendorCDR_20' ) end [2025-03-03 08:32:16] Production.INFO: ProcessCDR(1,14597262,1,1,2) [2025-03-03 08:32:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597262,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:32:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597262,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:32:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597262,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:32:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597262,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:32:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597262', 'tblTempUsageDetail_20' ) start [2025-03-03 08:32:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597262', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:32:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:32:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:32:24] Production.INFO: ==30236== Releasing lock... [2025-03-03 08:32:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:32:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:33:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:33:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:33:16] Production.INFO: count ==409 [2025-03-03 08:33:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:33:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597267', 'tblTempUsageDetail_20' ) start [2025-03-03 08:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597267', 'tblTempUsageDetail_20' ) end [2025-03-03 08:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597267', 'tblTempVendorCDR_20' ) start [2025-03-03 08:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597267', 'tblTempVendorCDR_20' ) end [2025-03-03 08:33:16] Production.INFO: ProcessCDR(1,14597267,1,1,2) [2025-03-03 08:33:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597267,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:33:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597267,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:33:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597267,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:33:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597267,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:33:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597267', 'tblTempUsageDetail_20' ) start [2025-03-03 08:33:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597267', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:33:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:33:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:33:23] Production.INFO: ==30327== Releasing lock... [2025-03-03 08:33:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:33:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:34:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:34:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:34:16] Production.INFO: count ==409 [2025-03-03 08:34:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:34:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597272', 'tblTempUsageDetail_20' ) start [2025-03-03 08:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597272', 'tblTempUsageDetail_20' ) end [2025-03-03 08:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597272', 'tblTempVendorCDR_20' ) start [2025-03-03 08:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597272', 'tblTempVendorCDR_20' ) end [2025-03-03 08:34:16] Production.INFO: ProcessCDR(1,14597272,1,1,2) [2025-03-03 08:34:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597272,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:34:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597272,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:34:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597272,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:34:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597272,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:34:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597272', 'tblTempUsageDetail_20' ) start [2025-03-03 08:34:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597272', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:34:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:34:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:34:24] Production.INFO: ==30419== Releasing lock... [2025-03-03 08:34:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:34:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:35:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:35:16] Production.INFO: count ==409 [2025-03-03 08:35:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:35:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:35:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597277', 'tblTempUsageDetail_20' ) start [2025-03-03 08:35:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597277', 'tblTempUsageDetail_20' ) end [2025-03-03 08:35:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597277', 'tblTempVendorCDR_20' ) start [2025-03-03 08:35:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597277', 'tblTempVendorCDR_20' ) end [2025-03-03 08:35:16] Production.INFO: ProcessCDR(1,14597277,1,1,2) [2025-03-03 08:35:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597277,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:35:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597277,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:35:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597277,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:35:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597277,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:35:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597277', 'tblTempUsageDetail_20' ) start [2025-03-03 08:35:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597277', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:35:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:35:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:35:24] Production.INFO: ==30506== Releasing lock... [2025-03-03 08:35:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:35:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:36:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:36:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:36:16] Production.INFO: count ==409 [2025-03-03 08:36:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:36:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597282', 'tblTempUsageDetail_20' ) start [2025-03-03 08:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597282', 'tblTempUsageDetail_20' ) end [2025-03-03 08:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597282', 'tblTempVendorCDR_20' ) start [2025-03-03 08:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597282', 'tblTempVendorCDR_20' ) end [2025-03-03 08:36:16] Production.INFO: ProcessCDR(1,14597282,1,1,2) [2025-03-03 08:36:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597282,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:36:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597282,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:36:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597282,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:36:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597282,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:36:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597282', 'tblTempUsageDetail_20' ) start [2025-03-03 08:36:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597282', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:36:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:36:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:36:24] Production.INFO: ==30639== Releasing lock... [2025-03-03 08:36:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:36:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:37:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:37:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:37:16] Production.INFO: count ==409 [2025-03-03 08:37:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:37:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:37:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597287', 'tblTempUsageDetail_20' ) start [2025-03-03 08:37:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597287', 'tblTempUsageDetail_20' ) end [2025-03-03 08:37:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597287', 'tblTempVendorCDR_20' ) start [2025-03-03 08:37:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597287', 'tblTempVendorCDR_20' ) end [2025-03-03 08:37:16] Production.INFO: ProcessCDR(1,14597287,1,1,2) [2025-03-03 08:37:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597287,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:37:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597287,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:37:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597287,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:37:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597287,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:37:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597287', 'tblTempUsageDetail_20' ) start [2025-03-03 08:37:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597287', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:37:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:37:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:37:25] Production.INFO: ==30732== Releasing lock... [2025-03-03 08:37:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:37:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:38:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:38:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:38:16] Production.INFO: count ==409 [2025-03-03 08:38:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:38:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597292', 'tblTempUsageDetail_20' ) start [2025-03-03 08:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597292', 'tblTempUsageDetail_20' ) end [2025-03-03 08:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597292', 'tblTempVendorCDR_20' ) start [2025-03-03 08:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597292', 'tblTempVendorCDR_20' ) end [2025-03-03 08:38:16] Production.INFO: ProcessCDR(1,14597292,1,1,2) [2025-03-03 08:38:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597292,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:38:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597292,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:38:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597292,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:38:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597292,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597292', 'tblTempUsageDetail_20' ) start [2025-03-03 08:38:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597292', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:38:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:38:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:38:24] Production.INFO: ==30822== Releasing lock... [2025-03-03 08:38:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:38:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:39:03] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:39:03] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:39:16] Production.INFO: count ==409 [2025-03-03 08:39:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:39:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597297', 'tblTempUsageDetail_20' ) start [2025-03-03 08:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597297', 'tblTempUsageDetail_20' ) end [2025-03-03 08:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597297', 'tblTempVendorCDR_20' ) start [2025-03-03 08:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597297', 'tblTempVendorCDR_20' ) end [2025-03-03 08:39:16] Production.INFO: ProcessCDR(1,14597297,1,1,2) [2025-03-03 08:39:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597297,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:39:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597297,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:39:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597297,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:39:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597297,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:39:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597297', 'tblTempUsageDetail_20' ) start [2025-03-03 08:39:22] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597297', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:39:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:39:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:39:23] Production.INFO: ==30912== Releasing lock... [2025-03-03 08:39:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:39:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:40:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:40:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:40:17] Production.INFO: count ==409 [2025-03-03 08:40:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:40:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597302', 'tblTempUsageDetail_20' ) start [2025-03-03 08:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597302', 'tblTempUsageDetail_20' ) end [2025-03-03 08:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597302', 'tblTempVendorCDR_20' ) start [2025-03-03 08:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597302', 'tblTempVendorCDR_20' ) end [2025-03-03 08:40:17] Production.INFO: ProcessCDR(1,14597302,1,1,2) [2025-03-03 08:40:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597302,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:40:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597302,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:40:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597302,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:40:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597302,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:40:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597302', 'tblTempUsageDetail_20' ) start [2025-03-03 08:40:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597302', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:40:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:40:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:40:25] Production.INFO: ==31008== Releasing lock... [2025-03-03 08:40:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:40:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:41:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:41:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:41:16] Production.INFO: count ==409 [2025-03-03 08:41:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:41:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597308', 'tblTempUsageDetail_20' ) start [2025-03-03 08:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597308', 'tblTempUsageDetail_20' ) end [2025-03-03 08:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597308', 'tblTempVendorCDR_20' ) start [2025-03-03 08:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597308', 'tblTempVendorCDR_20' ) end [2025-03-03 08:41:16] Production.INFO: ProcessCDR(1,14597308,1,1,2) [2025-03-03 08:41:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597308,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:41:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597308,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:41:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597308,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:41:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597308,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:41:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597308', 'tblTempUsageDetail_20' ) start [2025-03-03 08:41:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597308', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:41:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:41:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:41:23] Production.INFO: ==31099== Releasing lock... [2025-03-03 08:41:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:41:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:42:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:42:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:42:16] Production.INFO: count ==409 [2025-03-03 08:42:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:42:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597313', 'tblTempUsageDetail_20' ) start [2025-03-03 08:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597313', 'tblTempUsageDetail_20' ) end [2025-03-03 08:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597313', 'tblTempVendorCDR_20' ) start [2025-03-03 08:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597313', 'tblTempVendorCDR_20' ) end [2025-03-03 08:42:16] Production.INFO: ProcessCDR(1,14597313,1,1,2) [2025-03-03 08:42:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597313,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:42:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597313,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:42:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597313,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:42:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597313,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:42:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597313', 'tblTempUsageDetail_20' ) start [2025-03-03 08:42:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597313', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:42:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:42:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:42:24] Production.INFO: ==31190== Releasing lock... [2025-03-03 08:42:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:42:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:43:03] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:43:03] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:43:15] Production.INFO: count ==409 [2025-03-03 08:43:15] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:43:15] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:43:15] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597318', 'tblTempUsageDetail_20' ) start [2025-03-03 08:43:15] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597318', 'tblTempUsageDetail_20' ) end [2025-03-03 08:43:15] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597318', 'tblTempVendorCDR_20' ) start [2025-03-03 08:43:15] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597318', 'tblTempVendorCDR_20' ) end [2025-03-03 08:43:15] Production.INFO: ProcessCDR(1,14597318,1,1,2) [2025-03-03 08:43:15] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597318,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:43:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597318,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:43:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597318,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:43:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597318,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:43:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597318', 'tblTempUsageDetail_20' ) start [2025-03-03 08:43:22] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597318', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:43:23] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:43:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:43:23] Production.INFO: ==31278== Releasing lock... [2025-03-03 08:43:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:43:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:44:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:44:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:44:16] Production.INFO: count ==409 [2025-03-03 08:44:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:44:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597323', 'tblTempUsageDetail_20' ) start [2025-03-03 08:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597323', 'tblTempUsageDetail_20' ) end [2025-03-03 08:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597323', 'tblTempVendorCDR_20' ) start [2025-03-03 08:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597323', 'tblTempVendorCDR_20' ) end [2025-03-03 08:44:16] Production.INFO: ProcessCDR(1,14597323,1,1,2) [2025-03-03 08:44:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597323,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:44:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597323,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:44:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597323,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:44:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597323,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597323', 'tblTempUsageDetail_20' ) start [2025-03-03 08:44:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597323', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:44:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:44:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:44:24] Production.INFO: ==31369== Releasing lock... [2025-03-03 08:44:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:44:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:45:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:45:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:45:17] Production.INFO: count ==409 [2025-03-03 08:45:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:45:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597328', 'tblTempUsageDetail_20' ) start [2025-03-03 08:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597328', 'tblTempUsageDetail_20' ) end [2025-03-03 08:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597328', 'tblTempVendorCDR_20' ) start [2025-03-03 08:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597328', 'tblTempVendorCDR_20' ) end [2025-03-03 08:45:17] Production.INFO: ProcessCDR(1,14597328,1,1,2) [2025-03-03 08:45:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597328,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:45:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597328,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:45:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597328,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:45:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597328,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:45:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597328', 'tblTempUsageDetail_20' ) start [2025-03-03 08:45:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597328', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:45:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:45:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:45:25] Production.INFO: ==31458== Releasing lock... [2025-03-03 08:45:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:45:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:46:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:46:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:46:16] Production.INFO: count ==409 [2025-03-03 08:46:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:46:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597333', 'tblTempUsageDetail_20' ) start [2025-03-03 08:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597333', 'tblTempUsageDetail_20' ) end [2025-03-03 08:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597333', 'tblTempVendorCDR_20' ) start [2025-03-03 08:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597333', 'tblTempVendorCDR_20' ) end [2025-03-03 08:46:17] Production.INFO: ProcessCDR(1,14597333,1,1,2) [2025-03-03 08:46:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597333,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:46:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597333,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:46:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597333,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:46:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597333,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:46:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597333', 'tblTempUsageDetail_20' ) start [2025-03-03 08:46:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597333', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:46:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:46:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:46:24] Production.INFO: ==31546== Releasing lock... [2025-03-03 08:46:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:46:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:47:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:47:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:47:16] Production.INFO: count ==409 [2025-03-03 08:47:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:47:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597338', 'tblTempUsageDetail_20' ) start [2025-03-03 08:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597338', 'tblTempUsageDetail_20' ) end [2025-03-03 08:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597338', 'tblTempVendorCDR_20' ) start [2025-03-03 08:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597338', 'tblTempVendorCDR_20' ) end [2025-03-03 08:47:17] Production.INFO: ProcessCDR(1,14597338,1,1,2) [2025-03-03 08:47:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597338,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:47:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597338,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:47:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597338,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:47:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597338,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:47:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597338', 'tblTempUsageDetail_20' ) start [2025-03-03 08:47:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597338', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:47:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:47:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:47:24] Production.INFO: ==31624== Releasing lock... [2025-03-03 08:47:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:47:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:48:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:48:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:48:16] Production.INFO: count ==409 [2025-03-03 08:48:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:48:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597343', 'tblTempUsageDetail_20' ) start [2025-03-03 08:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597343', 'tblTempUsageDetail_20' ) end [2025-03-03 08:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597343', 'tblTempVendorCDR_20' ) start [2025-03-03 08:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597343', 'tblTempVendorCDR_20' ) end [2025-03-03 08:48:16] Production.INFO: ProcessCDR(1,14597343,1,1,2) [2025-03-03 08:48:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597343,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:48:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597343,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:48:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597343,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:48:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597343,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:48:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597343', 'tblTempUsageDetail_20' ) start [2025-03-03 08:48:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597343', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:48:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:48:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:48:24] Production.INFO: ==31707== Releasing lock... [2025-03-03 08:48:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:48:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:49:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:49:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:49:17] Production.INFO: count ==409 [2025-03-03 08:49:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:49:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597348', 'tblTempUsageDetail_20' ) start [2025-03-03 08:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597348', 'tblTempUsageDetail_20' ) end [2025-03-03 08:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597348', 'tblTempVendorCDR_20' ) start [2025-03-03 08:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597348', 'tblTempVendorCDR_20' ) end [2025-03-03 08:49:17] Production.INFO: ProcessCDR(1,14597348,1,1,2) [2025-03-03 08:49:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597348,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:49:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597348,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:49:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597348,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:49:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597348,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:49:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597348', 'tblTempUsageDetail_20' ) start [2025-03-03 08:49:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597348', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:49:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:49:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:49:25] Production.INFO: ==31782== Releasing lock... [2025-03-03 08:49:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:49:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:50:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:50:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:50:16] Production.INFO: count ==409 [2025-03-03 08:50:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:50:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597353', 'tblTempUsageDetail_20' ) start [2025-03-03 08:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597353', 'tblTempUsageDetail_20' ) end [2025-03-03 08:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597353', 'tblTempVendorCDR_20' ) start [2025-03-03 08:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597353', 'tblTempVendorCDR_20' ) end [2025-03-03 08:50:17] Production.INFO: ProcessCDR(1,14597353,1,1,2) [2025-03-03 08:50:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597353,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:50:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597353,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:50:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597353,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:50:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597353,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:50:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597353', 'tblTempUsageDetail_20' ) start [2025-03-03 08:50:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597353', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:50:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:50:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:50:24] Production.INFO: ==31857== Releasing lock... [2025-03-03 08:50:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:50:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:51:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:51:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:51:16] Production.INFO: count ==409 [2025-03-03 08:51:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:51:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597359', 'tblTempUsageDetail_20' ) start [2025-03-03 08:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597359', 'tblTempUsageDetail_20' ) end [2025-03-03 08:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597359', 'tblTempVendorCDR_20' ) start [2025-03-03 08:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597359', 'tblTempVendorCDR_20' ) end [2025-03-03 08:51:17] Production.INFO: ProcessCDR(1,14597359,1,1,2) [2025-03-03 08:51:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597359,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:51:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597359,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:51:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597359,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:51:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597359,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:51:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597359', 'tblTempUsageDetail_20' ) start [2025-03-03 08:51:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597359', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:51:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:51:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:51:24] Production.INFO: ==31939== Releasing lock... [2025-03-03 08:51:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:51:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:52:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:52:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:52:16] Production.INFO: count ==409 [2025-03-03 08:52:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:52:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:52:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597364', 'tblTempUsageDetail_20' ) start [2025-03-03 08:52:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597364', 'tblTempUsageDetail_20' ) end [2025-03-03 08:52:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597364', 'tblTempVendorCDR_20' ) start [2025-03-03 08:52:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597364', 'tblTempVendorCDR_20' ) end [2025-03-03 08:52:16] Production.INFO: ProcessCDR(1,14597364,1,1,2) [2025-03-03 08:52:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597364,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:52:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597364,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:52:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597364,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:52:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597364,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:52:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597364', 'tblTempUsageDetail_20' ) start [2025-03-03 08:52:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597364', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:52:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:52:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:52:24] Production.INFO: ==32050== Releasing lock... [2025-03-03 08:52:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:52:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:53:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:53:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:53:16] Production.INFO: count ==409 [2025-03-03 08:53:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:53:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597369', 'tblTempUsageDetail_20' ) start [2025-03-03 08:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597369', 'tblTempUsageDetail_20' ) end [2025-03-03 08:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597369', 'tblTempVendorCDR_20' ) start [2025-03-03 08:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597369', 'tblTempVendorCDR_20' ) end [2025-03-03 08:53:16] Production.INFO: ProcessCDR(1,14597369,1,1,2) [2025-03-03 08:53:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597369,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:53:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597369,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:53:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597369,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:53:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597369,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597369', 'tblTempUsageDetail_20' ) start [2025-03-03 08:53:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597369', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:53:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:53:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:53:24] Production.INFO: ==32127== Releasing lock... [2025-03-03 08:53:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:53:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:54:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:54:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:54:17] Production.INFO: count ==409 [2025-03-03 08:54:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:54:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597374', 'tblTempUsageDetail_20' ) start [2025-03-03 08:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597374', 'tblTempUsageDetail_20' ) end [2025-03-03 08:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597374', 'tblTempVendorCDR_20' ) start [2025-03-03 08:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597374', 'tblTempVendorCDR_20' ) end [2025-03-03 08:54:17] Production.INFO: ProcessCDR(1,14597374,1,1,2) [2025-03-03 08:54:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597374,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:54:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597374,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:54:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597374,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:54:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597374,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:54:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597374', 'tblTempUsageDetail_20' ) start [2025-03-03 08:54:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597374', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:54:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:54:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:54:24] Production.INFO: ==32199== Releasing lock... [2025-03-03 08:54:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:54:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:55:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:55:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:55:16] Production.INFO: count ==409 [2025-03-03 08:55:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:55:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597379', 'tblTempUsageDetail_20' ) start [2025-03-03 08:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597379', 'tblTempUsageDetail_20' ) end [2025-03-03 08:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597379', 'tblTempVendorCDR_20' ) start [2025-03-03 08:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597379', 'tblTempVendorCDR_20' ) end [2025-03-03 08:55:16] Production.INFO: ProcessCDR(1,14597379,1,1,2) [2025-03-03 08:55:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597379,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:55:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597379,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:55:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597379,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:55:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597379,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597379', 'tblTempUsageDetail_20' ) start [2025-03-03 08:55:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597379', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:55:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:55:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:55:24] Production.INFO: ==32274== Releasing lock... [2025-03-03 08:55:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:55:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:56:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:56:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:56:17] Production.INFO: count ==409 [2025-03-03 08:56:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:56:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597384', 'tblTempUsageDetail_20' ) start [2025-03-03 08:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597384', 'tblTempUsageDetail_20' ) end [2025-03-03 08:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597384', 'tblTempVendorCDR_20' ) start [2025-03-03 08:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597384', 'tblTempVendorCDR_20' ) end [2025-03-03 08:56:17] Production.INFO: ProcessCDR(1,14597384,1,1,2) [2025-03-03 08:56:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597384,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:56:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597384,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:56:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597384,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:56:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597384,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:56:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597384', 'tblTempUsageDetail_20' ) start [2025-03-03 08:56:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597384', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:56:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:56:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:56:25] Production.INFO: ==32352== Releasing lock... [2025-03-03 08:56:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:56:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:57:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:57:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:57:16] Production.INFO: count ==409 [2025-03-03 08:57:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:57:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597389', 'tblTempUsageDetail_20' ) start [2025-03-03 08:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597389', 'tblTempUsageDetail_20' ) end [2025-03-03 08:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597389', 'tblTempVendorCDR_20' ) start [2025-03-03 08:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597389', 'tblTempVendorCDR_20' ) end [2025-03-03 08:57:17] Production.INFO: ProcessCDR(1,14597389,1,1,2) [2025-03-03 08:57:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597389,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:57:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597389,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:57:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597389,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:57:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597389,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:57:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597389', 'tblTempUsageDetail_20' ) start [2025-03-03 08:57:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597389', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:57:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:57:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:57:25] Production.INFO: ==32424== Releasing lock... [2025-03-03 08:57:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:57:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:58:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:58:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:58:16] Production.INFO: count ==409 [2025-03-03 08:58:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:58:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597394', 'tblTempUsageDetail_20' ) start [2025-03-03 08:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597394', 'tblTempUsageDetail_20' ) end [2025-03-03 08:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597394', 'tblTempVendorCDR_20' ) start [2025-03-03 08:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597394', 'tblTempVendorCDR_20' ) end [2025-03-03 08:58:16] Production.INFO: ProcessCDR(1,14597394,1,1,2) [2025-03-03 08:58:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597394,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:58:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597394,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:58:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597394,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:58:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597394,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:58:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597394', 'tblTempUsageDetail_20' ) start [2025-03-03 08:58:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597394', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:58:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:58:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:58:24] Production.INFO: ==32499== Releasing lock... [2025-03-03 08:58:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:58:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 08:59:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 08:59:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 08:59:16] Production.INFO: count ==409 [2025-03-03 08:59:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 08:59:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 08:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597399', 'tblTempUsageDetail_20' ) start [2025-03-03 08:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597399', 'tblTempUsageDetail_20' ) end [2025-03-03 08:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597399', 'tblTempVendorCDR_20' ) start [2025-03-03 08:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597399', 'tblTempVendorCDR_20' ) end [2025-03-03 08:59:17] Production.INFO: ProcessCDR(1,14597399,1,1,2) [2025-03-03 08:59:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597399,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:59:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597399,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 08:59:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597399,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:59:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597399,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 08:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597399', 'tblTempUsageDetail_20' ) start [2025-03-03 08:59:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597399', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 08:59:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 08:59:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 08:59:25] Production.INFO: ==32573== Releasing lock... [2025-03-03 08:59:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 08:59:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:00:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:00:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:00:17] Production.INFO: count ==409 [2025-03-03 09:00:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:00:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597405', 'tblTempUsageDetail_20' ) start [2025-03-03 09:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597405', 'tblTempUsageDetail_20' ) end [2025-03-03 09:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597405', 'tblTempVendorCDR_20' ) start [2025-03-03 09:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597405', 'tblTempVendorCDR_20' ) end [2025-03-03 09:00:17] Production.INFO: ProcessCDR(1,14597405,1,1,2) [2025-03-03 09:00:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597405,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:00:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597405,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:00:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597405,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:00:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597405,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:00:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597405', 'tblTempUsageDetail_20' ) start [2025-03-03 09:00:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597405', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:00:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:00:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:00:26] Production.INFO: ==32652== Releasing lock... [2025-03-03 09:00:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:00:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:01:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:01:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:01:16] Production.INFO: count ==409 [2025-03-03 09:01:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:01:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597410', 'tblTempUsageDetail_20' ) start [2025-03-03 09:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597410', 'tblTempUsageDetail_20' ) end [2025-03-03 09:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597410', 'tblTempVendorCDR_20' ) start [2025-03-03 09:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597410', 'tblTempVendorCDR_20' ) end [2025-03-03 09:01:16] Production.INFO: ProcessCDR(1,14597410,1,1,2) [2025-03-03 09:01:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597410,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:01:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597410,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:01:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597410,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:01:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597410,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:01:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597410', 'tblTempUsageDetail_20' ) start [2025-03-03 09:01:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597410', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:01:24] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:01:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:01:24] Production.INFO: ==32738== Releasing lock... [2025-03-03 09:01:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:01:24] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:02:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:02:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:02:17] Production.INFO: count ==409 [2025-03-03 09:02:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:02:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597415', 'tblTempUsageDetail_20' ) start [2025-03-03 09:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597415', 'tblTempUsageDetail_20' ) end [2025-03-03 09:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597415', 'tblTempVendorCDR_20' ) start [2025-03-03 09:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597415', 'tblTempVendorCDR_20' ) end [2025-03-03 09:02:17] Production.INFO: ProcessCDR(1,14597415,1,1,2) [2025-03-03 09:02:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597415,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:02:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597415,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:02:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597415,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:02:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597415,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:02:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597415', 'tblTempUsageDetail_20' ) start [2025-03-03 09:02:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597415', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:02:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:02:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:02:26] Production.INFO: ==372== Releasing lock... [2025-03-03 09:02:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:02:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:03:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:03:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:03:17] Production.INFO: count ==409 [2025-03-03 09:03:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:03:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597420', 'tblTempUsageDetail_20' ) start [2025-03-03 09:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597420', 'tblTempUsageDetail_20' ) end [2025-03-03 09:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597420', 'tblTempVendorCDR_20' ) start [2025-03-03 09:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597420', 'tblTempVendorCDR_20' ) end [2025-03-03 09:03:17] Production.INFO: ProcessCDR(1,14597420,1,1,2) [2025-03-03 09:03:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597420,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:03:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597420,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:03:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597420,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:03:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597420,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:03:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597420', 'tblTempUsageDetail_20' ) start [2025-03-03 09:03:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597420', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:03:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:03:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:03:26] Production.INFO: ==451== Releasing lock... [2025-03-03 09:03:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:03:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:04:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:04:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:04:17] Production.INFO: count ==409 [2025-03-03 09:04:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:04:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597425', 'tblTempUsageDetail_20' ) start [2025-03-03 09:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597425', 'tblTempUsageDetail_20' ) end [2025-03-03 09:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597425', 'tblTempVendorCDR_20' ) start [2025-03-03 09:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597425', 'tblTempVendorCDR_20' ) end [2025-03-03 09:04:17] Production.INFO: ProcessCDR(1,14597425,1,1,2) [2025-03-03 09:04:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597425,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:04:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597425,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:04:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597425,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:04:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597425,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:04:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597425', 'tblTempUsageDetail_20' ) start [2025-03-03 09:04:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597425', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:04:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:04:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:04:26] Production.INFO: ==531== Releasing lock... [2025-03-03 09:04:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:04:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:05:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:05:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:05:16] Production.INFO: count ==409 [2025-03-03 09:05:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:05:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597430', 'tblTempUsageDetail_20' ) start [2025-03-03 09:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597430', 'tblTempUsageDetail_20' ) end [2025-03-03 09:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597430', 'tblTempVendorCDR_20' ) start [2025-03-03 09:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597430', 'tblTempVendorCDR_20' ) end [2025-03-03 09:05:16] Production.INFO: ProcessCDR(1,14597430,1,1,2) [2025-03-03 09:05:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597430,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:05:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597430,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:05:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597430,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:05:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597430,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:05:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597430', 'tblTempUsageDetail_20' ) start [2025-03-03 09:05:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597430', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:05:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:05:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:05:26] Production.INFO: ==610== Releasing lock... [2025-03-03 09:05:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:05:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:06:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:06:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:06:16] Production.INFO: count ==409 [2025-03-03 09:06:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:06:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597435', 'tblTempUsageDetail_20' ) start [2025-03-03 09:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597435', 'tblTempUsageDetail_20' ) end [2025-03-03 09:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597435', 'tblTempVendorCDR_20' ) start [2025-03-03 09:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597435', 'tblTempVendorCDR_20' ) end [2025-03-03 09:06:16] Production.INFO: ProcessCDR(1,14597435,1,1,2) [2025-03-03 09:06:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597435,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:06:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597435,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:06:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597435,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:06:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597435,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:06:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597435', 'tblTempUsageDetail_20' ) start [2025-03-03 09:06:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597435', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:06:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:06:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:06:25] Production.INFO: ==717== Releasing lock... [2025-03-03 09:06:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:06:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:07:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:07:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:07:17] Production.INFO: count ==409 [2025-03-03 09:07:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:07:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597440', 'tblTempUsageDetail_20' ) start [2025-03-03 09:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597440', 'tblTempUsageDetail_20' ) end [2025-03-03 09:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597440', 'tblTempVendorCDR_20' ) start [2025-03-03 09:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597440', 'tblTempVendorCDR_20' ) end [2025-03-03 09:07:17] Production.INFO: ProcessCDR(1,14597440,1,1,2) [2025-03-03 09:07:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597440,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:07:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597440,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:07:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597440,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:07:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597440,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:07:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597440', 'tblTempUsageDetail_20' ) start [2025-03-03 09:07:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597440', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:07:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:07:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:07:25] Production.INFO: ==846== Releasing lock... [2025-03-03 09:07:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:07:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:08:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:08:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:08:16] Production.INFO: count ==409 [2025-03-03 09:08:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:08:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597445', 'tblTempUsageDetail_20' ) start [2025-03-03 09:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597445', 'tblTempUsageDetail_20' ) end [2025-03-03 09:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597445', 'tblTempVendorCDR_20' ) start [2025-03-03 09:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597445', 'tblTempVendorCDR_20' ) end [2025-03-03 09:08:16] Production.INFO: ProcessCDR(1,14597445,1,1,2) [2025-03-03 09:08:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597445,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:08:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597445,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:08:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597445,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:08:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597445,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:08:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597445', 'tblTempUsageDetail_20' ) start [2025-03-03 09:08:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597445', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:08:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:08:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:08:26] Production.INFO: ==924== Releasing lock... [2025-03-03 09:08:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:08:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:09:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:09:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:09:16] Production.INFO: count ==409 [2025-03-03 09:09:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:09:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597450', 'tblTempUsageDetail_20' ) start [2025-03-03 09:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597450', 'tblTempUsageDetail_20' ) end [2025-03-03 09:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597450', 'tblTempVendorCDR_20' ) start [2025-03-03 09:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597450', 'tblTempVendorCDR_20' ) end [2025-03-03 09:09:16] Production.INFO: ProcessCDR(1,14597450,1,1,2) [2025-03-03 09:09:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597450,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:09:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597450,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:09:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597450,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:09:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597450,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:09:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597450', 'tblTempUsageDetail_20' ) start [2025-03-03 09:09:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597450', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:09:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:09:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:09:25] Production.INFO: ==1003== Releasing lock... [2025-03-03 09:09:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:09:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:10:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:10:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:10:17] Production.INFO: count ==409 [2025-03-03 09:10:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:10:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597456', 'tblTempUsageDetail_20' ) start [2025-03-03 09:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597456', 'tblTempUsageDetail_20' ) end [2025-03-03 09:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597456', 'tblTempVendorCDR_20' ) start [2025-03-03 09:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597456', 'tblTempVendorCDR_20' ) end [2025-03-03 09:10:17] Production.INFO: ProcessCDR(1,14597456,1,1,2) [2025-03-03 09:10:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597456,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:10:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597456,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:10:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597456,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:10:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597456,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:10:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597456', 'tblTempUsageDetail_20' ) start [2025-03-03 09:10:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597456', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:10:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:10:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:10:25] Production.INFO: ==1086== Releasing lock... [2025-03-03 09:10:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:10:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:11:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:11:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:11:17] Production.INFO: count ==409 [2025-03-03 09:11:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:11:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597461', 'tblTempUsageDetail_20' ) start [2025-03-03 09:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597461', 'tblTempUsageDetail_20' ) end [2025-03-03 09:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597461', 'tblTempVendorCDR_20' ) start [2025-03-03 09:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597461', 'tblTempVendorCDR_20' ) end [2025-03-03 09:11:17] Production.INFO: ProcessCDR(1,14597461,1,1,2) [2025-03-03 09:11:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597461,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:11:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597461,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:11:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597461,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:11:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597461,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:11:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597461', 'tblTempUsageDetail_20' ) start [2025-03-03 09:11:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597461', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:11:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:11:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:11:26] Production.INFO: ==1167== Releasing lock... [2025-03-03 09:11:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:11:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:12:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:12:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:12:16] Production.INFO: count ==409 [2025-03-03 09:12:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:12:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597466', 'tblTempUsageDetail_20' ) start [2025-03-03 09:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597466', 'tblTempUsageDetail_20' ) end [2025-03-03 09:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597466', 'tblTempVendorCDR_20' ) start [2025-03-03 09:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597466', 'tblTempVendorCDR_20' ) end [2025-03-03 09:12:17] Production.INFO: ProcessCDR(1,14597466,1,1,2) [2025-03-03 09:12:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597466,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:12:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597466,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:12:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597466,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:12:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597466,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:12:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597466', 'tblTempUsageDetail_20' ) start [2025-03-03 09:12:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597466', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:12:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:12:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:12:25] Production.INFO: ==1260== Releasing lock... [2025-03-03 09:12:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:12:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:13:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:13:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:13:17] Production.INFO: count ==409 [2025-03-03 09:13:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:13:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597471', 'tblTempUsageDetail_20' ) start [2025-03-03 09:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597471', 'tblTempUsageDetail_20' ) end [2025-03-03 09:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597471', 'tblTempVendorCDR_20' ) start [2025-03-03 09:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597471', 'tblTempVendorCDR_20' ) end [2025-03-03 09:13:17] Production.INFO: ProcessCDR(1,14597471,1,1,2) [2025-03-03 09:13:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597471,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:13:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597471,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:13:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597471,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:13:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597471,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:13:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597471', 'tblTempUsageDetail_20' ) start [2025-03-03 09:13:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597471', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:13:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:13:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:13:26] Production.INFO: ==1335== Releasing lock... [2025-03-03 09:13:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:13:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:14:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:14:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:14:16] Production.INFO: count ==409 [2025-03-03 09:14:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:14:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597476', 'tblTempUsageDetail_20' ) start [2025-03-03 09:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597476', 'tblTempUsageDetail_20' ) end [2025-03-03 09:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597476', 'tblTempVendorCDR_20' ) start [2025-03-03 09:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597476', 'tblTempVendorCDR_20' ) end [2025-03-03 09:14:17] Production.INFO: ProcessCDR(1,14597476,1,1,2) [2025-03-03 09:14:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597476,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:14:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597476,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:14:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597476,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:14:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597476,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:14:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597476', 'tblTempUsageDetail_20' ) start [2025-03-03 09:14:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597476', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:14:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:14:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:14:25] Production.INFO: ==1415== Releasing lock... [2025-03-03 09:14:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:14:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:15:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:15:18] Production.INFO: count ==409 [2025-03-03 09:15:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:15:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597481', 'tblTempUsageDetail_20' ) start [2025-03-03 09:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597481', 'tblTempUsageDetail_20' ) end [2025-03-03 09:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597481', 'tblTempVendorCDR_20' ) start [2025-03-03 09:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597481', 'tblTempVendorCDR_20' ) end [2025-03-03 09:15:18] Production.INFO: ProcessCDR(1,14597481,1,1,2) [2025-03-03 09:15:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597481,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:15:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597481,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:15:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597481,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:15:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597481,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:15:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597481', 'tblTempUsageDetail_20' ) start [2025-03-03 09:15:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597481', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:15:27] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:15:27] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:15:27] Production.INFO: ==1491== Releasing lock... [2025-03-03 09:15:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:15:27] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:16:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:16:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:16:17] Production.INFO: count ==409 [2025-03-03 09:16:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:16:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597486', 'tblTempUsageDetail_20' ) start [2025-03-03 09:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597486', 'tblTempUsageDetail_20' ) end [2025-03-03 09:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597486', 'tblTempVendorCDR_20' ) start [2025-03-03 09:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597486', 'tblTempVendorCDR_20' ) end [2025-03-03 09:16:17] Production.INFO: ProcessCDR(1,14597486,1,1,2) [2025-03-03 09:16:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597486,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:16:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597486,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:16:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597486,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:16:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597486,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:16:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597486', 'tblTempUsageDetail_20' ) start [2025-03-03 09:16:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597486', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:16:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:16:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:16:26] Production.INFO: ==1602== Releasing lock... [2025-03-03 09:16:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:16:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:17:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:17:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:17:17] Production.INFO: count ==409 [2025-03-03 09:17:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:17:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597491', 'tblTempUsageDetail_20' ) start [2025-03-03 09:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597491', 'tblTempUsageDetail_20' ) end [2025-03-03 09:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597491', 'tblTempVendorCDR_20' ) start [2025-03-03 09:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597491', 'tblTempVendorCDR_20' ) end [2025-03-03 09:17:17] Production.INFO: ProcessCDR(1,14597491,1,1,2) [2025-03-03 09:17:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597491,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:17:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597491,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:17:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597491,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:17:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597491,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:17:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597491', 'tblTempUsageDetail_20' ) start [2025-03-03 09:17:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597491', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:17:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:17:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:17:26] Production.INFO: ==1690== Releasing lock... [2025-03-03 09:17:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:17:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:18:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:18:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:18:16] Production.INFO: count ==409 [2025-03-03 09:18:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:18:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597496', 'tblTempUsageDetail_20' ) start [2025-03-03 09:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597496', 'tblTempUsageDetail_20' ) end [2025-03-03 09:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597496', 'tblTempVendorCDR_20' ) start [2025-03-03 09:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597496', 'tblTempVendorCDR_20' ) end [2025-03-03 09:18:17] Production.INFO: ProcessCDR(1,14597496,1,1,2) [2025-03-03 09:18:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597496,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:18:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597496,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:18:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597496,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:18:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597496,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:18:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597496', 'tblTempUsageDetail_20' ) start [2025-03-03 09:18:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597496', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:18:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:18:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:18:25] Production.INFO: ==1764== Releasing lock... [2025-03-03 09:18:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:18:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:19:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:19:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:19:17] Production.INFO: count ==409 [2025-03-03 09:19:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:19:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597501', 'tblTempUsageDetail_20' ) start [2025-03-03 09:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597501', 'tblTempUsageDetail_20' ) end [2025-03-03 09:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597501', 'tblTempVendorCDR_20' ) start [2025-03-03 09:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597501', 'tblTempVendorCDR_20' ) end [2025-03-03 09:19:17] Production.INFO: ProcessCDR(1,14597501,1,1,2) [2025-03-03 09:19:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597501,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:19:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597501,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:19:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597501,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:19:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597501,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:19:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597501', 'tblTempUsageDetail_20' ) start [2025-03-03 09:19:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597501', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:19:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:19:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:19:26] Production.INFO: ==1846== Releasing lock... [2025-03-03 09:19:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:19:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:20:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:20:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:20:17] Production.INFO: count ==409 [2025-03-03 09:20:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:20:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597507', 'tblTempUsageDetail_20' ) start [2025-03-03 09:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597507', 'tblTempUsageDetail_20' ) end [2025-03-03 09:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597507', 'tblTempVendorCDR_20' ) start [2025-03-03 09:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597507', 'tblTempVendorCDR_20' ) end [2025-03-03 09:20:17] Production.INFO: ProcessCDR(1,14597507,1,1,2) [2025-03-03 09:20:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597507,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:20:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597507,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:20:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597507,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:20:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597507,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:20:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597507', 'tblTempUsageDetail_20' ) start [2025-03-03 09:20:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597507', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:20:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:20:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:20:26] Production.INFO: ==1926== Releasing lock... [2025-03-03 09:20:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:20:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:21:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:21:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:21:17] Production.INFO: count ==409 [2025-03-03 09:21:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:21:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:21:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597512', 'tblTempUsageDetail_20' ) start [2025-03-03 09:21:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597512', 'tblTempUsageDetail_20' ) end [2025-03-03 09:21:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597512', 'tblTempVendorCDR_20' ) start [2025-03-03 09:21:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597512', 'tblTempVendorCDR_20' ) end [2025-03-03 09:21:18] Production.INFO: ProcessCDR(1,14597512,1,1,2) [2025-03-03 09:21:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597512,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:21:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597512,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:21:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597512,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:21:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597512,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:21:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597512', 'tblTempUsageDetail_20' ) start [2025-03-03 09:21:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597512', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:21:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:21:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:21:26] Production.INFO: ==2008== Releasing lock... [2025-03-03 09:21:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:21:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:22:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:22:16] Production.INFO: count ==409 [2025-03-03 09:22:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:22:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597517', 'tblTempUsageDetail_20' ) start [2025-03-03 09:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597517', 'tblTempUsageDetail_20' ) end [2025-03-03 09:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597517', 'tblTempVendorCDR_20' ) start [2025-03-03 09:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597517', 'tblTempVendorCDR_20' ) end [2025-03-03 09:22:17] Production.INFO: ProcessCDR(1,14597517,1,1,2) [2025-03-03 09:22:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597517,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:22:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597517,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:22:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597517,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:22:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597517,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:22:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597517', 'tblTempUsageDetail_20' ) start [2025-03-03 09:22:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597517', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:22:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:22:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:22:25] Production.INFO: ==2122== Releasing lock... [2025-03-03 09:22:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:22:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:23:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:23:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:23:16] Production.INFO: count ==409 [2025-03-03 09:23:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:23:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597522', 'tblTempUsageDetail_20' ) start [2025-03-03 09:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597522', 'tblTempUsageDetail_20' ) end [2025-03-03 09:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597522', 'tblTempVendorCDR_20' ) start [2025-03-03 09:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597522', 'tblTempVendorCDR_20' ) end [2025-03-03 09:23:17] Production.INFO: ProcessCDR(1,14597522,1,1,2) [2025-03-03 09:23:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597522,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:23:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597522,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:23:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597522,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:23:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597522,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:23:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597522', 'tblTempUsageDetail_20' ) start [2025-03-03 09:23:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597522', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:23:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:23:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:23:25] Production.INFO: ==2200== Releasing lock... [2025-03-03 09:23:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:23:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:24:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:24:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:24:17] Production.INFO: count ==409 [2025-03-03 09:24:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:24:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597527', 'tblTempUsageDetail_20' ) start [2025-03-03 09:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597527', 'tblTempUsageDetail_20' ) end [2025-03-03 09:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597527', 'tblTempVendorCDR_20' ) start [2025-03-03 09:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597527', 'tblTempVendorCDR_20' ) end [2025-03-03 09:24:17] Production.INFO: ProcessCDR(1,14597527,1,1,2) [2025-03-03 09:24:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597527,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:24:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597527,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:24:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597527,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:24:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597527,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:24:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597527', 'tblTempUsageDetail_20' ) start [2025-03-03 09:24:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597527', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:24:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:24:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:24:26] Production.INFO: ==2283== Releasing lock... [2025-03-03 09:24:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:24:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:25:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:25:17] Production.INFO: count ==409 [2025-03-03 09:25:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:25:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597532', 'tblTempUsageDetail_20' ) start [2025-03-03 09:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597532', 'tblTempUsageDetail_20' ) end [2025-03-03 09:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597532', 'tblTempVendorCDR_20' ) start [2025-03-03 09:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597532', 'tblTempVendorCDR_20' ) end [2025-03-03 09:25:18] Production.INFO: ProcessCDR(1,14597532,1,1,2) [2025-03-03 09:25:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597532,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:25:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597532,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:25:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597532,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:25:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597532,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:25:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597532', 'tblTempUsageDetail_20' ) start [2025-03-03 09:25:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597532', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:25:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:25:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:25:26] Production.INFO: ==2357== Releasing lock... [2025-03-03 09:25:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:25:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:26:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:26:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:26:17] Production.INFO: count ==409 [2025-03-03 09:26:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:26:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597537', 'tblTempUsageDetail_20' ) start [2025-03-03 09:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597537', 'tblTempUsageDetail_20' ) end [2025-03-03 09:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597537', 'tblTempVendorCDR_20' ) start [2025-03-03 09:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597537', 'tblTempVendorCDR_20' ) end [2025-03-03 09:26:17] Production.INFO: ProcessCDR(1,14597537,1,1,2) [2025-03-03 09:26:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597537,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:26:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597537,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:26:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597537,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:26:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597537,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:26:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597537', 'tblTempUsageDetail_20' ) start [2025-03-03 09:26:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597537', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:26:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:26:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:26:25] Production.INFO: ==2444== Releasing lock... [2025-03-03 09:26:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:26:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:27:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:27:17] Production.INFO: count ==409 [2025-03-03 09:27:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:27:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597542', 'tblTempUsageDetail_20' ) start [2025-03-03 09:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597542', 'tblTempUsageDetail_20' ) end [2025-03-03 09:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597542', 'tblTempVendorCDR_20' ) start [2025-03-03 09:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597542', 'tblTempVendorCDR_20' ) end [2025-03-03 09:27:17] Production.INFO: ProcessCDR(1,14597542,1,1,2) [2025-03-03 09:27:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597542,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:27:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597542,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:27:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597542,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:27:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597542,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:27:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597542', 'tblTempUsageDetail_20' ) start [2025-03-03 09:27:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597542', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:27:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:27:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:27:26] Production.INFO: ==2520== Releasing lock... [2025-03-03 09:27:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:27:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:28:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:28:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:28:17] Production.INFO: count ==409 [2025-03-03 09:28:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:28:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597547', 'tblTempUsageDetail_20' ) start [2025-03-03 09:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597547', 'tblTempUsageDetail_20' ) end [2025-03-03 09:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597547', 'tblTempVendorCDR_20' ) start [2025-03-03 09:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597547', 'tblTempVendorCDR_20' ) end [2025-03-03 09:28:17] Production.INFO: ProcessCDR(1,14597547,1,1,2) [2025-03-03 09:28:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597547,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:28:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597547,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:28:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597547,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:28:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597547,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:28:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597547', 'tblTempUsageDetail_20' ) start [2025-03-03 09:28:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597547', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:28:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:28:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:28:25] Production.INFO: ==2600== Releasing lock... [2025-03-03 09:28:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:28:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:29:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:29:17] Production.INFO: count ==409 [2025-03-03 09:29:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:29:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597552', 'tblTempUsageDetail_20' ) start [2025-03-03 09:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597552', 'tblTempUsageDetail_20' ) end [2025-03-03 09:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597552', 'tblTempVendorCDR_20' ) start [2025-03-03 09:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597552', 'tblTempVendorCDR_20' ) end [2025-03-03 09:29:17] Production.INFO: ProcessCDR(1,14597552,1,1,2) [2025-03-03 09:29:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597552,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:29:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597552,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:29:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597552,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:29:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597552,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:29:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597552', 'tblTempUsageDetail_20' ) start [2025-03-03 09:29:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597552', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:29:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:29:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:29:25] Production.INFO: ==2674== Releasing lock... [2025-03-03 09:29:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:29:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:30:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:30:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:30:17] Production.INFO: count ==409 [2025-03-03 09:30:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:30:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597558', 'tblTempUsageDetail_20' ) start [2025-03-03 09:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597558', 'tblTempUsageDetail_20' ) end [2025-03-03 09:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597558', 'tblTempVendorCDR_20' ) start [2025-03-03 09:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597558', 'tblTempVendorCDR_20' ) end [2025-03-03 09:30:18] Production.INFO: ProcessCDR(1,14597558,1,1,2) [2025-03-03 09:30:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597558,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:30:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597558,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:30:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597558,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:30:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597558,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:30:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597558', 'tblTempUsageDetail_20' ) start [2025-03-03 09:30:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597558', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:30:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:30:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:30:26] Production.INFO: ==2752== Releasing lock... [2025-03-03 09:30:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:30:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:31:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:31:17] Production.INFO: count ==409 [2025-03-03 09:31:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:31:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597563', 'tblTempUsageDetail_20' ) start [2025-03-03 09:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597563', 'tblTempUsageDetail_20' ) end [2025-03-03 09:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597563', 'tblTempVendorCDR_20' ) start [2025-03-03 09:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597563', 'tblTempVendorCDR_20' ) end [2025-03-03 09:31:17] Production.INFO: ProcessCDR(1,14597563,1,1,2) [2025-03-03 09:31:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597563,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:31:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597563,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:31:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597563,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:31:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597563,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:31:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597563', 'tblTempUsageDetail_20' ) start [2025-03-03 09:31:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597563', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:31:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:31:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:31:26] Production.INFO: ==2834== Releasing lock... [2025-03-03 09:31:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:31:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:32:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:32:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:32:16] Production.INFO: count ==409 [2025-03-03 09:32:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:32:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597568', 'tblTempUsageDetail_20' ) start [2025-03-03 09:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597568', 'tblTempUsageDetail_20' ) end [2025-03-03 09:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597568', 'tblTempVendorCDR_20' ) start [2025-03-03 09:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597568', 'tblTempVendorCDR_20' ) end [2025-03-03 09:32:17] Production.INFO: ProcessCDR(1,14597568,1,1,2) [2025-03-03 09:32:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597568,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:32:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597568,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:32:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597568,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:32:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597568,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:32:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597568', 'tblTempUsageDetail_20' ) start [2025-03-03 09:32:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597568', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:32:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:32:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:32:25] Production.INFO: ==2917== Releasing lock... [2025-03-03 09:32:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:32:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:33:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:33:17] Production.INFO: count ==409 [2025-03-03 09:33:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:33:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597573', 'tblTempUsageDetail_20' ) start [2025-03-03 09:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597573', 'tblTempUsageDetail_20' ) end [2025-03-03 09:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597573', 'tblTempVendorCDR_20' ) start [2025-03-03 09:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597573', 'tblTempVendorCDR_20' ) end [2025-03-03 09:33:17] Production.INFO: ProcessCDR(1,14597573,1,1,2) [2025-03-03 09:33:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597573,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:33:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597573,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:33:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597573,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:33:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597573,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:33:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597573', 'tblTempUsageDetail_20' ) start [2025-03-03 09:33:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597573', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:33:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:33:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:33:25] Production.INFO: ==2991== Releasing lock... [2025-03-03 09:33:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:33:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:34:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:34:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:34:16] Production.INFO: count ==409 [2025-03-03 09:34:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:34:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597578', 'tblTempUsageDetail_20' ) start [2025-03-03 09:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597578', 'tblTempUsageDetail_20' ) end [2025-03-03 09:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597578', 'tblTempVendorCDR_20' ) start [2025-03-03 09:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597578', 'tblTempVendorCDR_20' ) end [2025-03-03 09:34:16] Production.INFO: ProcessCDR(1,14597578,1,1,2) [2025-03-03 09:34:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597578,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:34:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597578,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:34:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597578,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:34:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597578,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:34:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597578', 'tblTempUsageDetail_20' ) start [2025-03-03 09:34:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597578', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:34:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:34:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:34:25] Production.INFO: ==3066== Releasing lock... [2025-03-03 09:34:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:34:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:35:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:35:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:35:17] Production.INFO: count ==409 [2025-03-03 09:35:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:35:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597583', 'tblTempUsageDetail_20' ) start [2025-03-03 09:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597583', 'tblTempUsageDetail_20' ) end [2025-03-03 09:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597583', 'tblTempVendorCDR_20' ) start [2025-03-03 09:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597583', 'tblTempVendorCDR_20' ) end [2025-03-03 09:35:17] Production.INFO: ProcessCDR(1,14597583,1,1,2) [2025-03-03 09:35:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597583,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:35:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597583,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:35:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597583,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:35:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597583,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:35:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597583', 'tblTempUsageDetail_20' ) start [2025-03-03 09:35:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597583', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:35:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:35:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:35:26] Production.INFO: ==3149== Releasing lock... [2025-03-03 09:35:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:35:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:36:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:36:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:36:16] Production.INFO: count ==409 [2025-03-03 09:36:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:36:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597587', 'tblTempUsageDetail_20' ) start [2025-03-03 09:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597587', 'tblTempUsageDetail_20' ) end [2025-03-03 09:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597587', 'tblTempVendorCDR_20' ) start [2025-03-03 09:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597587', 'tblTempVendorCDR_20' ) end [2025-03-03 09:36:16] Production.INFO: ProcessCDR(1,14597587,1,1,2) [2025-03-03 09:36:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597587,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:36:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597587,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:36:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597587,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:36:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597587,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:36:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597587', 'tblTempUsageDetail_20' ) start [2025-03-03 09:36:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597587', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:36:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:36:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:36:25] Production.INFO: ==3238== Releasing lock... [2025-03-03 09:36:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:36:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:37:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:37:16] Production.INFO: count ==409 [2025-03-03 09:37:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:37:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597593', 'tblTempUsageDetail_20' ) start [2025-03-03 09:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597593', 'tblTempUsageDetail_20' ) end [2025-03-03 09:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597593', 'tblTempVendorCDR_20' ) start [2025-03-03 09:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597593', 'tblTempVendorCDR_20' ) end [2025-03-03 09:37:17] Production.INFO: ProcessCDR(1,14597593,1,1,2) [2025-03-03 09:37:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597593,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:37:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597593,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:37:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597593,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:37:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597593,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:37:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597593', 'tblTempUsageDetail_20' ) start [2025-03-03 09:37:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597593', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:37:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:37:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:37:25] Production.INFO: ==3322== Releasing lock... [2025-03-03 09:37:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:37:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:38:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:38:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:38:17] Production.INFO: count ==409 [2025-03-03 09:38:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:38:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597598', 'tblTempUsageDetail_20' ) start [2025-03-03 09:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597598', 'tblTempUsageDetail_20' ) end [2025-03-03 09:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597598', 'tblTempVendorCDR_20' ) start [2025-03-03 09:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597598', 'tblTempVendorCDR_20' ) end [2025-03-03 09:38:17] Production.INFO: ProcessCDR(1,14597598,1,1,2) [2025-03-03 09:38:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597598,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:38:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597598,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:38:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597598,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:38:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597598,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:38:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597598', 'tblTempUsageDetail_20' ) start [2025-03-03 09:38:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597598', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:38:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:38:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:38:25] Production.INFO: ==3452== Releasing lock... [2025-03-03 09:38:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:38:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:39:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:39:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:39:17] Production.INFO: count ==409 [2025-03-03 09:39:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:39:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597603', 'tblTempUsageDetail_20' ) start [2025-03-03 09:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597603', 'tblTempUsageDetail_20' ) end [2025-03-03 09:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597603', 'tblTempVendorCDR_20' ) start [2025-03-03 09:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597603', 'tblTempVendorCDR_20' ) end [2025-03-03 09:39:17] Production.INFO: ProcessCDR(1,14597603,1,1,2) [2025-03-03 09:39:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597603,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:39:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597603,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:39:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597603,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:39:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597603,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:39:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597603', 'tblTempUsageDetail_20' ) start [2025-03-03 09:39:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597603', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:39:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:39:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:39:26] Production.INFO: ==3541== Releasing lock... [2025-03-03 09:39:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:39:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:40:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:40:17] Production.INFO: count ==409 [2025-03-03 09:40:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:40:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597608', 'tblTempUsageDetail_20' ) start [2025-03-03 09:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597608', 'tblTempUsageDetail_20' ) end [2025-03-03 09:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597608', 'tblTempVendorCDR_20' ) start [2025-03-03 09:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597608', 'tblTempVendorCDR_20' ) end [2025-03-03 09:40:17] Production.INFO: ProcessCDR(1,14597608,1,1,2) [2025-03-03 09:40:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597608,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:40:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597608,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:40:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597608,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:40:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597608,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:40:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597608', 'tblTempUsageDetail_20' ) start [2025-03-03 09:40:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597608', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:40:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:40:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:40:26] Production.INFO: ==3629== Releasing lock... [2025-03-03 09:40:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:40:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:41:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:41:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:41:17] Production.INFO: count ==409 [2025-03-03 09:41:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:41:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597614', 'tblTempUsageDetail_20' ) start [2025-03-03 09:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597614', 'tblTempUsageDetail_20' ) end [2025-03-03 09:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597614', 'tblTempVendorCDR_20' ) start [2025-03-03 09:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597614', 'tblTempVendorCDR_20' ) end [2025-03-03 09:41:18] Production.INFO: ProcessCDR(1,14597614,1,1,2) [2025-03-03 09:41:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597614,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:41:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597614,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:41:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597614,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:41:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597614,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:41:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597614', 'tblTempUsageDetail_20' ) start [2025-03-03 09:41:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597614', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:41:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:41:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:41:26] Production.INFO: ==3724== Releasing lock... [2025-03-03 09:41:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:41:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:42:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:42:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:42:17] Production.INFO: count ==409 [2025-03-03 09:42:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:42:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597619', 'tblTempUsageDetail_20' ) start [2025-03-03 09:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597619', 'tblTempUsageDetail_20' ) end [2025-03-03 09:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597619', 'tblTempVendorCDR_20' ) start [2025-03-03 09:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597619', 'tblTempVendorCDR_20' ) end [2025-03-03 09:42:17] Production.INFO: ProcessCDR(1,14597619,1,1,2) [2025-03-03 09:42:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597619,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:42:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597619,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:42:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597619,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:42:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597619,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:42:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597619', 'tblTempUsageDetail_20' ) start [2025-03-03 09:42:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597619', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:42:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:42:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:42:26] Production.INFO: ==3813== Releasing lock... [2025-03-03 09:42:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:42:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:43:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:43:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:43:17] Production.INFO: count ==409 [2025-03-03 09:43:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:43:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597624', 'tblTempUsageDetail_20' ) start [2025-03-03 09:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597624', 'tblTempUsageDetail_20' ) end [2025-03-03 09:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597624', 'tblTempVendorCDR_20' ) start [2025-03-03 09:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597624', 'tblTempVendorCDR_20' ) end [2025-03-03 09:43:17] Production.INFO: ProcessCDR(1,14597624,1,1,2) [2025-03-03 09:43:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597624,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:43:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597624,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:43:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597624,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:43:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597624,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:43:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597624', 'tblTempUsageDetail_20' ) start [2025-03-03 09:43:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597624', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:43:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:43:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:43:25] Production.INFO: ==3894== Releasing lock... [2025-03-03 09:43:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:43:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:44:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:44:17] Production.INFO: count ==409 [2025-03-03 09:44:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:44:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597629', 'tblTempUsageDetail_20' ) start [2025-03-03 09:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597629', 'tblTempUsageDetail_20' ) end [2025-03-03 09:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597629', 'tblTempVendorCDR_20' ) start [2025-03-03 09:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597629', 'tblTempVendorCDR_20' ) end [2025-03-03 09:44:17] Production.INFO: ProcessCDR(1,14597629,1,1,2) [2025-03-03 09:44:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597629,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:44:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597629,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:44:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597629,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:44:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597629,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:44:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597629', 'tblTempUsageDetail_20' ) start [2025-03-03 09:44:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597629', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:44:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:44:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:44:26] Production.INFO: ==3975== Releasing lock... [2025-03-03 09:44:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:44:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:45:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:45:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:45:17] Production.INFO: count ==409 [2025-03-03 09:45:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:45:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597634', 'tblTempUsageDetail_20' ) start [2025-03-03 09:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597634', 'tblTempUsageDetail_20' ) end [2025-03-03 09:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597634', 'tblTempVendorCDR_20' ) start [2025-03-03 09:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597634', 'tblTempVendorCDR_20' ) end [2025-03-03 09:45:17] Production.INFO: ProcessCDR(1,14597634,1,1,2) [2025-03-03 09:45:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597634,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:45:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597634,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:45:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597634,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:45:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597634,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:45:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597634', 'tblTempUsageDetail_20' ) start [2025-03-03 09:45:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597634', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:45:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:45:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:45:26] Production.INFO: ==4063== Releasing lock... [2025-03-03 09:45:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:45:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:46:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:46:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:46:17] Production.INFO: count ==409 [2025-03-03 09:46:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:46:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597639', 'tblTempUsageDetail_20' ) start [2025-03-03 09:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597639', 'tblTempUsageDetail_20' ) end [2025-03-03 09:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597639', 'tblTempVendorCDR_20' ) start [2025-03-03 09:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597639', 'tblTempVendorCDR_20' ) end [2025-03-03 09:46:17] Production.INFO: ProcessCDR(1,14597639,1,1,2) [2025-03-03 09:46:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597639,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:46:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597639,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:46:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597639,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:46:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597639,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:46:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597639', 'tblTempUsageDetail_20' ) start [2025-03-03 09:46:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597639', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:46:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:46:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:46:26] Production.INFO: ==4152== Releasing lock... [2025-03-03 09:46:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:46:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:47:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:47:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:47:16] Production.INFO: count ==409 [2025-03-03 09:47:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:47:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597644', 'tblTempUsageDetail_20' ) start [2025-03-03 09:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597644', 'tblTempUsageDetail_20' ) end [2025-03-03 09:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597644', 'tblTempVendorCDR_20' ) start [2025-03-03 09:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597644', 'tblTempVendorCDR_20' ) end [2025-03-03 09:47:16] Production.INFO: ProcessCDR(1,14597644,1,1,2) [2025-03-03 09:47:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597644,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:47:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597644,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:47:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597644,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:47:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597644,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:47:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597644', 'tblTempUsageDetail_20' ) start [2025-03-03 09:47:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597644', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:47:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:47:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:47:25] Production.INFO: ==4236== Releasing lock... [2025-03-03 09:47:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:47:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:48:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:48:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:48:16] Production.INFO: count ==409 [2025-03-03 09:48:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:48:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597649', 'tblTempUsageDetail_20' ) start [2025-03-03 09:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597649', 'tblTempUsageDetail_20' ) end [2025-03-03 09:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597649', 'tblTempVendorCDR_20' ) start [2025-03-03 09:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597649', 'tblTempVendorCDR_20' ) end [2025-03-03 09:48:17] Production.INFO: ProcessCDR(1,14597649,1,1,2) [2025-03-03 09:48:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597649,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:48:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597649,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:48:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597649,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:48:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597649,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:48:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597649', 'tblTempUsageDetail_20' ) start [2025-03-03 09:48:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597649', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:48:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:48:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:48:25] Production.INFO: ==4321== Releasing lock... [2025-03-03 09:48:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:48:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:49:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:49:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:49:17] Production.INFO: count ==409 [2025-03-03 09:49:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:49:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597654', 'tblTempUsageDetail_20' ) start [2025-03-03 09:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597654', 'tblTempUsageDetail_20' ) end [2025-03-03 09:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597654', 'tblTempVendorCDR_20' ) start [2025-03-03 09:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597654', 'tblTempVendorCDR_20' ) end [2025-03-03 09:49:17] Production.INFO: ProcessCDR(1,14597654,1,1,2) [2025-03-03 09:49:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597654,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:49:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597654,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:49:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597654,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:49:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597654,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:49:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597654', 'tblTempUsageDetail_20' ) start [2025-03-03 09:49:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597654', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:49:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:49:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:49:26] Production.INFO: ==4409== Releasing lock... [2025-03-03 09:49:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:49:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:50:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:50:17] Production.INFO: count ==409 [2025-03-03 09:50:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:50:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597659', 'tblTempUsageDetail_20' ) start [2025-03-03 09:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597659', 'tblTempUsageDetail_20' ) end [2025-03-03 09:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597659', 'tblTempVendorCDR_20' ) start [2025-03-03 09:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597659', 'tblTempVendorCDR_20' ) end [2025-03-03 09:50:17] Production.INFO: ProcessCDR(1,14597659,1,1,2) [2025-03-03 09:50:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597659,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:50:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597659,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:50:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597659,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:50:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597659,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:50:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597659', 'tblTempUsageDetail_20' ) start [2025-03-03 09:50:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597659', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:50:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:50:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:50:26] Production.INFO: ==4494== Releasing lock... [2025-03-03 09:50:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:50:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:51:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:51:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:51:17] Production.INFO: count ==409 [2025-03-03 09:51:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:51:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597665', 'tblTempUsageDetail_20' ) start [2025-03-03 09:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597665', 'tblTempUsageDetail_20' ) end [2025-03-03 09:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597665', 'tblTempVendorCDR_20' ) start [2025-03-03 09:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597665', 'tblTempVendorCDR_20' ) end [2025-03-03 09:51:17] Production.INFO: ProcessCDR(1,14597665,1,1,2) [2025-03-03 09:51:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597665,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:51:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597665,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:51:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597665,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:51:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597665,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:51:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597665', 'tblTempUsageDetail_20' ) start [2025-03-03 09:51:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597665', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:51:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:51:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:51:26] Production.INFO: ==4585== Releasing lock... [2025-03-03 09:51:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:51:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:52:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:52:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:52:17] Production.INFO: count ==409 [2025-03-03 09:52:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:52:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597670', 'tblTempUsageDetail_20' ) start [2025-03-03 09:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597670', 'tblTempUsageDetail_20' ) end [2025-03-03 09:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597670', 'tblTempVendorCDR_20' ) start [2025-03-03 09:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597670', 'tblTempVendorCDR_20' ) end [2025-03-03 09:52:17] Production.INFO: ProcessCDR(1,14597670,1,1,2) [2025-03-03 09:52:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597670,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:52:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597670,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:52:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597670,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:52:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597670,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:52:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597670', 'tblTempUsageDetail_20' ) start [2025-03-03 09:52:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597670', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:52:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:52:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:52:26] Production.INFO: ==4668== Releasing lock... [2025-03-03 09:52:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:52:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:53:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:53:17] Production.INFO: count ==409 [2025-03-03 09:53:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:53:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597675', 'tblTempUsageDetail_20' ) start [2025-03-03 09:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597675', 'tblTempUsageDetail_20' ) end [2025-03-03 09:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597675', 'tblTempVendorCDR_20' ) start [2025-03-03 09:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597675', 'tblTempVendorCDR_20' ) end [2025-03-03 09:53:17] Production.INFO: ProcessCDR(1,14597675,1,1,2) [2025-03-03 09:53:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597675,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:53:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597675,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:53:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597675,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:53:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597675,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:53:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597675', 'tblTempUsageDetail_20' ) start [2025-03-03 09:53:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597675', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:53:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:53:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:53:25] Production.INFO: ==4794== Releasing lock... [2025-03-03 09:53:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:53:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:54:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:54:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:54:17] Production.INFO: count ==409 [2025-03-03 09:54:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:54:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597680', 'tblTempUsageDetail_20' ) start [2025-03-03 09:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597680', 'tblTempUsageDetail_20' ) end [2025-03-03 09:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597680', 'tblTempVendorCDR_20' ) start [2025-03-03 09:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597680', 'tblTempVendorCDR_20' ) end [2025-03-03 09:54:17] Production.INFO: ProcessCDR(1,14597680,1,1,2) [2025-03-03 09:54:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597680,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:54:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597680,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:54:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597680,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:54:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597680,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:54:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597680', 'tblTempUsageDetail_20' ) start [2025-03-03 09:54:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597680', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:54:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:54:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:54:25] Production.INFO: ==4878== Releasing lock... [2025-03-03 09:54:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:54:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:55:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:55:17] Production.INFO: count ==409 [2025-03-03 09:55:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:55:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597685', 'tblTempUsageDetail_20' ) start [2025-03-03 09:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597685', 'tblTempUsageDetail_20' ) end [2025-03-03 09:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597685', 'tblTempVendorCDR_20' ) start [2025-03-03 09:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597685', 'tblTempVendorCDR_20' ) end [2025-03-03 09:55:17] Production.INFO: ProcessCDR(1,14597685,1,1,2) [2025-03-03 09:55:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597685,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:55:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597685,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:55:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597685,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:55:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597685,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:55:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597685', 'tblTempUsageDetail_20' ) start [2025-03-03 09:55:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597685', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:55:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:55:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:55:26] Production.INFO: ==4960== Releasing lock... [2025-03-03 09:55:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:55:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:56:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:56:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:56:16] Production.INFO: count ==409 [2025-03-03 09:56:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:56:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597690', 'tblTempUsageDetail_20' ) start [2025-03-03 09:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597690', 'tblTempUsageDetail_20' ) end [2025-03-03 09:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597690', 'tblTempVendorCDR_20' ) start [2025-03-03 09:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597690', 'tblTempVendorCDR_20' ) end [2025-03-03 09:56:16] Production.INFO: ProcessCDR(1,14597690,1,1,2) [2025-03-03 09:56:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597690,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:56:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597690,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:56:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597690,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:56:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597690,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:56:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597690', 'tblTempUsageDetail_20' ) start [2025-03-03 09:56:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597690', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:56:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:56:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:56:25] Production.INFO: ==5054== Releasing lock... [2025-03-03 09:56:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:56:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:57:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:57:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:57:16] Production.INFO: count ==409 [2025-03-03 09:57:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:57:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597695', 'tblTempUsageDetail_20' ) start [2025-03-03 09:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597695', 'tblTempUsageDetail_20' ) end [2025-03-03 09:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597695', 'tblTempVendorCDR_20' ) start [2025-03-03 09:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597695', 'tblTempVendorCDR_20' ) end [2025-03-03 09:57:17] Production.INFO: ProcessCDR(1,14597695,1,1,2) [2025-03-03 09:57:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597695,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:57:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597695,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:57:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597695,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:57:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597695,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:57:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597695', 'tblTempUsageDetail_20' ) start [2025-03-03 09:57:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597695', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:57:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:57:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:57:25] Production.INFO: ==5154== Releasing lock... [2025-03-03 09:57:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:57:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:58:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 09:58:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:58:16] Production.INFO: count ==409 [2025-03-03 09:58:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:58:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597700', 'tblTempUsageDetail_20' ) start [2025-03-03 09:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597700', 'tblTempUsageDetail_20' ) end [2025-03-03 09:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597700', 'tblTempVendorCDR_20' ) start [2025-03-03 09:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597700', 'tblTempVendorCDR_20' ) end [2025-03-03 09:58:17] Production.INFO: ProcessCDR(1,14597700,1,1,2) [2025-03-03 09:58:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597700,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:58:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597700,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:58:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597700,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:58:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597700,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:58:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597700', 'tblTempUsageDetail_20' ) start [2025-03-03 09:58:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597700', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:58:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:58:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:58:25] Production.INFO: ==5253== Releasing lock... [2025-03-03 09:58:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:58:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 09:59:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 09:59:17] Production.INFO: count ==409 [2025-03-03 09:59:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 09:59:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 09:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597705', 'tblTempUsageDetail_20' ) start [2025-03-03 09:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597705', 'tblTempUsageDetail_20' ) end [2025-03-03 09:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597705', 'tblTempVendorCDR_20' ) start [2025-03-03 09:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597705', 'tblTempVendorCDR_20' ) end [2025-03-03 09:59:17] Production.INFO: ProcessCDR(1,14597705,1,1,2) [2025-03-03 09:59:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597705,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:59:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597705,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 09:59:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597705,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:59:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597705,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 09:59:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597705', 'tblTempUsageDetail_20' ) start [2025-03-03 09:59:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597705', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 09:59:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 09:59:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 09:59:26] Production.INFO: ==5345== Releasing lock... [2025-03-03 09:59:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 09:59:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:00:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:00:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:00:17] Production.INFO: count ==409 [2025-03-03 10:00:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:00:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597711', 'tblTempUsageDetail_20' ) start [2025-03-03 10:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597711', 'tblTempUsageDetail_20' ) end [2025-03-03 10:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597711', 'tblTempVendorCDR_20' ) start [2025-03-03 10:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597711', 'tblTempVendorCDR_20' ) end [2025-03-03 10:00:17] Production.INFO: ProcessCDR(1,14597711,1,1,2) [2025-03-03 10:00:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597711,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:00:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597711,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:00:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597711,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:00:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597711,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:00:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597711', 'tblTempUsageDetail_20' ) start [2025-03-03 10:00:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597711', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:00:27] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:00:27] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:00:27] Production.INFO: ==5441== Releasing lock... [2025-03-03 10:00:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:00:27] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:01:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:01:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:01:16] Production.INFO: count ==409 [2025-03-03 10:01:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:01:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597716', 'tblTempUsageDetail_20' ) start [2025-03-03 10:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597716', 'tblTempUsageDetail_20' ) end [2025-03-03 10:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597716', 'tblTempVendorCDR_20' ) start [2025-03-03 10:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597716', 'tblTempVendorCDR_20' ) end [2025-03-03 10:01:17] Production.INFO: ProcessCDR(1,14597716,1,1,2) [2025-03-03 10:01:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597716,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:01:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597716,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:01:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597716,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:01:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597716,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:01:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597716', 'tblTempUsageDetail_20' ) start [2025-03-03 10:01:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597716', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:01:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:01:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:01:25] Production.INFO: ==5547== Releasing lock... [2025-03-03 10:01:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:01:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:02:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:02:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:02:16] Production.INFO: count ==409 [2025-03-03 10:02:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:02:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597721', 'tblTempUsageDetail_20' ) start [2025-03-03 10:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597721', 'tblTempUsageDetail_20' ) end [2025-03-03 10:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597721', 'tblTempVendorCDR_20' ) start [2025-03-03 10:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597721', 'tblTempVendorCDR_20' ) end [2025-03-03 10:02:17] Production.INFO: ProcessCDR(1,14597721,1,1,2) [2025-03-03 10:02:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597721,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:02:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597721,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:02:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597721,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:02:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597721,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:02:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597721', 'tblTempUsageDetail_20' ) start [2025-03-03 10:02:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597721', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:02:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:02:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:02:26] Production.INFO: ==5642== Releasing lock... [2025-03-03 10:02:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:02:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:03:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:03:17] Production.INFO: count ==409 [2025-03-03 10:03:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:03:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597726', 'tblTempUsageDetail_20' ) start [2025-03-03 10:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597726', 'tblTempUsageDetail_20' ) end [2025-03-03 10:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597726', 'tblTempVendorCDR_20' ) start [2025-03-03 10:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597726', 'tblTempVendorCDR_20' ) end [2025-03-03 10:03:17] Production.INFO: ProcessCDR(1,14597726,1,1,2) [2025-03-03 10:03:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597726,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:03:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597726,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:03:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597726,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:03:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597726,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:03:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597726', 'tblTempUsageDetail_20' ) start [2025-03-03 10:03:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597726', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:03:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:03:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:03:26] Production.INFO: ==5746== Releasing lock... [2025-03-03 10:03:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:03:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:04:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:04:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:04:17] Production.INFO: count ==409 [2025-03-03 10:04:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:04:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597731', 'tblTempUsageDetail_20' ) start [2025-03-03 10:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597731', 'tblTempUsageDetail_20' ) end [2025-03-03 10:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597731', 'tblTempVendorCDR_20' ) start [2025-03-03 10:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597731', 'tblTempVendorCDR_20' ) end [2025-03-03 10:04:17] Production.INFO: ProcessCDR(1,14597731,1,1,2) [2025-03-03 10:04:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597731,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:04:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597731,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:04:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597731,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:04:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597731,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:04:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597731', 'tblTempUsageDetail_20' ) start [2025-03-03 10:04:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597731', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:04:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:04:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:04:26] Production.INFO: ==5851== Releasing lock... [2025-03-03 10:04:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:04:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:05:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:05:17] Production.INFO: count ==409 [2025-03-03 10:05:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:05:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597736', 'tblTempUsageDetail_20' ) start [2025-03-03 10:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597736', 'tblTempUsageDetail_20' ) end [2025-03-03 10:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597736', 'tblTempVendorCDR_20' ) start [2025-03-03 10:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597736', 'tblTempVendorCDR_20' ) end [2025-03-03 10:05:17] Production.INFO: ProcessCDR(1,14597736,1,1,2) [2025-03-03 10:05:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597736,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:05:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597736,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:05:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597736,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:05:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597736,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:05:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597736', 'tblTempUsageDetail_20' ) start [2025-03-03 10:05:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597736', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:05:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:05:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:05:26] Production.INFO: ==5942== Releasing lock... [2025-03-03 10:05:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:05:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:06:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:06:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:06:16] Production.INFO: count ==409 [2025-03-03 10:06:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:06:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597741', 'tblTempUsageDetail_20' ) start [2025-03-03 10:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597741', 'tblTempUsageDetail_20' ) end [2025-03-03 10:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597741', 'tblTempVendorCDR_20' ) start [2025-03-03 10:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597741', 'tblTempVendorCDR_20' ) end [2025-03-03 10:06:16] Production.INFO: ProcessCDR(1,14597741,1,1,2) [2025-03-03 10:06:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597741,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:06:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597741,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:06:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597741,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:06:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597741,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:06:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597741', 'tblTempUsageDetail_20' ) start [2025-03-03 10:06:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597741', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:06:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:06:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:06:25] Production.INFO: ==6024== Releasing lock... [2025-03-03 10:06:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:06:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:07:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:07:18] Production.INFO: count ==409 [2025-03-03 10:07:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:07:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597746', 'tblTempUsageDetail_20' ) start [2025-03-03 10:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597746', 'tblTempUsageDetail_20' ) end [2025-03-03 10:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597746', 'tblTempVendorCDR_20' ) start [2025-03-03 10:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597746', 'tblTempVendorCDR_20' ) end [2025-03-03 10:07:18] Production.INFO: ProcessCDR(1,14597746,1,1,2) [2025-03-03 10:07:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597746,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:07:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597746,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:07:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597746,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:07:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597746,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:07:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597746', 'tblTempUsageDetail_20' ) start [2025-03-03 10:07:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597746', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:07:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:07:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:07:26] Production.INFO: ==6114== Releasing lock... [2025-03-03 10:07:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:07:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:08:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:08:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:08:16] Production.INFO: count ==409 [2025-03-03 10:08:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:08:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597751', 'tblTempUsageDetail_20' ) start [2025-03-03 10:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597751', 'tblTempUsageDetail_20' ) end [2025-03-03 10:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597751', 'tblTempVendorCDR_20' ) start [2025-03-03 10:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597751', 'tblTempVendorCDR_20' ) end [2025-03-03 10:08:17] Production.INFO: ProcessCDR(1,14597751,1,1,2) [2025-03-03 10:08:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597751,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:08:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597751,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:08:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597751,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:08:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597751,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:08:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597751', 'tblTempUsageDetail_20' ) start [2025-03-03 10:08:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597751', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:08:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:08:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:08:25] Production.INFO: ==6196== Releasing lock... [2025-03-03 10:08:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:08:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:09:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:09:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:09:17] Production.INFO: count ==409 [2025-03-03 10:09:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:09:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597756', 'tblTempUsageDetail_20' ) start [2025-03-03 10:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597756', 'tblTempUsageDetail_20' ) end [2025-03-03 10:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597756', 'tblTempVendorCDR_20' ) start [2025-03-03 10:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597756', 'tblTempVendorCDR_20' ) end [2025-03-03 10:09:17] Production.INFO: ProcessCDR(1,14597756,1,1,2) [2025-03-03 10:09:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597756,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:09:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597756,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:09:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597756,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:09:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597756,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:09:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597756', 'tblTempUsageDetail_20' ) start [2025-03-03 10:09:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597756', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:09:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:09:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:09:26] Production.INFO: ==6318== Releasing lock... [2025-03-03 10:09:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:09:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:10:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:10:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:10:17] Production.INFO: count ==409 [2025-03-03 10:10:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:10:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597762', 'tblTempUsageDetail_20' ) start [2025-03-03 10:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597762', 'tblTempUsageDetail_20' ) end [2025-03-03 10:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597762', 'tblTempVendorCDR_20' ) start [2025-03-03 10:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597762', 'tblTempVendorCDR_20' ) end [2025-03-03 10:10:17] Production.INFO: ProcessCDR(1,14597762,1,1,2) [2025-03-03 10:10:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597762,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:10:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597762,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:10:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597762,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:10:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597762,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:10:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597762', 'tblTempUsageDetail_20' ) start [2025-03-03 10:10:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597762', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:10:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:10:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:10:25] Production.INFO: ==6401== Releasing lock... [2025-03-03 10:10:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:10:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:11:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:11:17] Production.INFO: count ==409 [2025-03-03 10:11:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:11:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597767', 'tblTempUsageDetail_20' ) start [2025-03-03 10:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597767', 'tblTempUsageDetail_20' ) end [2025-03-03 10:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597767', 'tblTempVendorCDR_20' ) start [2025-03-03 10:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597767', 'tblTempVendorCDR_20' ) end [2025-03-03 10:11:17] Production.INFO: ProcessCDR(1,14597767,1,1,2) [2025-03-03 10:11:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597767,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:11:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597767,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:11:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597767,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:11:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597767,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:11:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597767', 'tblTempUsageDetail_20' ) start [2025-03-03 10:11:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597767', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:11:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:11:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:11:26] Production.INFO: ==6487== Releasing lock... [2025-03-03 10:11:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:11:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:12:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:12:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:12:16] Production.INFO: count ==409 [2025-03-03 10:12:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:12:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597772', 'tblTempUsageDetail_20' ) start [2025-03-03 10:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597772', 'tblTempUsageDetail_20' ) end [2025-03-03 10:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597772', 'tblTempVendorCDR_20' ) start [2025-03-03 10:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597772', 'tblTempVendorCDR_20' ) end [2025-03-03 10:12:16] Production.INFO: ProcessCDR(1,14597772,1,1,2) [2025-03-03 10:12:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597772,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:12:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597772,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:12:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597772,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:12:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597772,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:12:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597772', 'tblTempUsageDetail_20' ) start [2025-03-03 10:12:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597772', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:12:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:12:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:12:26] Production.INFO: ==6573== Releasing lock... [2025-03-03 10:12:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:12:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:13:17] Production.INFO: count ==409 [2025-03-03 10:13:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:13:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597777', 'tblTempUsageDetail_20' ) start [2025-03-03 10:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597777', 'tblTempUsageDetail_20' ) end [2025-03-03 10:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597777', 'tblTempVendorCDR_20' ) start [2025-03-03 10:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597777', 'tblTempVendorCDR_20' ) end [2025-03-03 10:13:17] Production.INFO: ProcessCDR(1,14597777,1,1,2) [2025-03-03 10:13:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597777,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:13:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597777,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:13:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597777,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:13:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597777,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:13:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597777', 'tblTempUsageDetail_20' ) start [2025-03-03 10:13:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597777', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:13:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:13:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:13:26] Production.INFO: ==6655== Releasing lock... [2025-03-03 10:13:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:13:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:14:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:14:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:14:17] Production.INFO: count ==409 [2025-03-03 10:14:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:14:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597782', 'tblTempUsageDetail_20' ) start [2025-03-03 10:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597782', 'tblTempUsageDetail_20' ) end [2025-03-03 10:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597782', 'tblTempVendorCDR_20' ) start [2025-03-03 10:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597782', 'tblTempVendorCDR_20' ) end [2025-03-03 10:14:17] Production.INFO: ProcessCDR(1,14597782,1,1,2) [2025-03-03 10:14:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597782,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:14:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597782,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:14:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597782,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:14:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597782,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:14:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597782', 'tblTempUsageDetail_20' ) start [2025-03-03 10:14:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597782', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:14:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:14:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:14:26] Production.INFO: ==6738== Releasing lock... [2025-03-03 10:14:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:14:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:15:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:15:17] Production.INFO: count ==409 [2025-03-03 10:15:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:15:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597787', 'tblTempUsageDetail_20' ) start [2025-03-03 10:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597787', 'tblTempUsageDetail_20' ) end [2025-03-03 10:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597787', 'tblTempVendorCDR_20' ) start [2025-03-03 10:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597787', 'tblTempVendorCDR_20' ) end [2025-03-03 10:15:17] Production.INFO: ProcessCDR(1,14597787,1,1,2) [2025-03-03 10:15:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597787,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:15:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597787,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:15:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597787,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:15:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597787,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:15:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597787', 'tblTempUsageDetail_20' ) start [2025-03-03 10:15:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597787', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:15:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:15:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:15:26] Production.INFO: ==6822== Releasing lock... [2025-03-03 10:15:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:15:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:16:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:16:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:16:16] Production.INFO: count ==409 [2025-03-03 10:16:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:16:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597792', 'tblTempUsageDetail_20' ) start [2025-03-03 10:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597792', 'tblTempUsageDetail_20' ) end [2025-03-03 10:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597792', 'tblTempVendorCDR_20' ) start [2025-03-03 10:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597792', 'tblTempVendorCDR_20' ) end [2025-03-03 10:16:17] Production.INFO: ProcessCDR(1,14597792,1,1,2) [2025-03-03 10:16:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597792,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:16:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597792,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:16:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597792,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:16:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597792,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:16:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597792', 'tblTempUsageDetail_20' ) start [2025-03-03 10:16:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597792', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:16:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:16:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:16:25] Production.INFO: ==6904== Releasing lock... [2025-03-03 10:16:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:16:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:17:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:17:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:17:17] Production.INFO: count ==409 [2025-03-03 10:17:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:17:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597797', 'tblTempUsageDetail_20' ) start [2025-03-03 10:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597797', 'tblTempUsageDetail_20' ) end [2025-03-03 10:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597797', 'tblTempVendorCDR_20' ) start [2025-03-03 10:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597797', 'tblTempVendorCDR_20' ) end [2025-03-03 10:17:17] Production.INFO: ProcessCDR(1,14597797,1,1,2) [2025-03-03 10:17:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597797,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:17:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597797,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:17:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597797,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:17:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597797,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:17:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597797', 'tblTempUsageDetail_20' ) start [2025-03-03 10:17:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597797', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:17:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:17:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:17:25] Production.INFO: ==6988== Releasing lock... [2025-03-03 10:17:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:17:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:18:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:18:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:18:16] Production.INFO: count ==409 [2025-03-03 10:18:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:18:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597802', 'tblTempUsageDetail_20' ) start [2025-03-03 10:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597802', 'tblTempUsageDetail_20' ) end [2025-03-03 10:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597802', 'tblTempVendorCDR_20' ) start [2025-03-03 10:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597802', 'tblTempVendorCDR_20' ) end [2025-03-03 10:18:16] Production.INFO: ProcessCDR(1,14597802,1,1,2) [2025-03-03 10:18:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597802,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:18:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597802,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:18:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597802,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:18:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597802,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:18:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597802', 'tblTempUsageDetail_20' ) start [2025-03-03 10:18:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597802', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:18:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:18:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:18:25] Production.INFO: ==7070== Releasing lock... [2025-03-03 10:18:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:18:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:19:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:19:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:19:17] Production.INFO: count ==409 [2025-03-03 10:19:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:19:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597807', 'tblTempUsageDetail_20' ) start [2025-03-03 10:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597807', 'tblTempUsageDetail_20' ) end [2025-03-03 10:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597807', 'tblTempVendorCDR_20' ) start [2025-03-03 10:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597807', 'tblTempVendorCDR_20' ) end [2025-03-03 10:19:17] Production.INFO: ProcessCDR(1,14597807,1,1,2) [2025-03-03 10:19:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597807,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:19:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597807,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:19:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597807,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:19:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597807,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:19:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597807', 'tblTempUsageDetail_20' ) start [2025-03-03 10:19:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597807', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:19:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:19:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:19:26] Production.INFO: ==7154== Releasing lock... [2025-03-03 10:19:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:19:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:20:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:20:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:20:17] Production.INFO: count ==409 [2025-03-03 10:20:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:20:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597813', 'tblTempUsageDetail_20' ) start [2025-03-03 10:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597813', 'tblTempUsageDetail_20' ) end [2025-03-03 10:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597813', 'tblTempVendorCDR_20' ) start [2025-03-03 10:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597813', 'tblTempVendorCDR_20' ) end [2025-03-03 10:20:17] Production.INFO: ProcessCDR(1,14597813,1,1,2) [2025-03-03 10:20:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597813,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:20:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597813,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:20:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597813,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:20:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597813,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:20:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597813', 'tblTempUsageDetail_20' ) start [2025-03-03 10:20:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597813', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:20:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:20:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:20:26] Production.INFO: ==7238== Releasing lock... [2025-03-03 10:20:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:20:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:21:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:21:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:21:17] Production.INFO: count ==409 [2025-03-03 10:21:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:21:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597818', 'tblTempUsageDetail_20' ) start [2025-03-03 10:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597818', 'tblTempUsageDetail_20' ) end [2025-03-03 10:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597818', 'tblTempVendorCDR_20' ) start [2025-03-03 10:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597818', 'tblTempVendorCDR_20' ) end [2025-03-03 10:21:17] Production.INFO: ProcessCDR(1,14597818,1,1,2) [2025-03-03 10:21:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597818,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:21:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597818,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:21:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597818,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:21:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597818,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:21:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597818', 'tblTempUsageDetail_20' ) start [2025-03-03 10:21:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597818', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:21:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:21:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:21:25] Production.INFO: ==7323== Releasing lock... [2025-03-03 10:21:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:21:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:22:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:22:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:22:16] Production.INFO: count ==409 [2025-03-03 10:22:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:22:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597823', 'tblTempUsageDetail_20' ) start [2025-03-03 10:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597823', 'tblTempUsageDetail_20' ) end [2025-03-03 10:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597823', 'tblTempVendorCDR_20' ) start [2025-03-03 10:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597823', 'tblTempVendorCDR_20' ) end [2025-03-03 10:22:17] Production.INFO: ProcessCDR(1,14597823,1,1,2) [2025-03-03 10:22:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597823,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:22:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597823,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:22:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597823,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:22:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597823,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:22:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597823', 'tblTempUsageDetail_20' ) start [2025-03-03 10:22:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597823', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:22:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:22:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:22:25] Production.INFO: ==7406== Releasing lock... [2025-03-03 10:22:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:22:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:23:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:23:17] Production.INFO: count ==409 [2025-03-03 10:23:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:23:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597828', 'tblTempUsageDetail_20' ) start [2025-03-03 10:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597828', 'tblTempUsageDetail_20' ) end [2025-03-03 10:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597828', 'tblTempVendorCDR_20' ) start [2025-03-03 10:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597828', 'tblTempVendorCDR_20' ) end [2025-03-03 10:23:17] Production.INFO: ProcessCDR(1,14597828,1,1,2) [2025-03-03 10:23:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597828,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:23:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597828,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:23:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597828,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:23:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597828,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:23:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597828', 'tblTempUsageDetail_20' ) start [2025-03-03 10:23:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597828', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:23:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:23:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:23:26] Production.INFO: ==7492== Releasing lock... [2025-03-03 10:23:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:23:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:24:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:24:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:24:17] Production.INFO: count ==409 [2025-03-03 10:24:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:24:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597833', 'tblTempUsageDetail_20' ) start [2025-03-03 10:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597833', 'tblTempUsageDetail_20' ) end [2025-03-03 10:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597833', 'tblTempVendorCDR_20' ) start [2025-03-03 10:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597833', 'tblTempVendorCDR_20' ) end [2025-03-03 10:24:18] Production.INFO: ProcessCDR(1,14597833,1,1,2) [2025-03-03 10:24:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597833,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:24:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597833,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:24:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597833,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:24:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597833,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:24:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597833', 'tblTempUsageDetail_20' ) start [2025-03-03 10:24:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597833', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:24:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:24:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:24:26] Production.INFO: ==7623== Releasing lock... [2025-03-03 10:24:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:24:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:25:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:25:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:25:17] Production.INFO: count ==409 [2025-03-03 10:25:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:25:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597838', 'tblTempUsageDetail_20' ) start [2025-03-03 10:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597838', 'tblTempUsageDetail_20' ) end [2025-03-03 10:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597838', 'tblTempVendorCDR_20' ) start [2025-03-03 10:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597838', 'tblTempVendorCDR_20' ) end [2025-03-03 10:25:17] Production.INFO: ProcessCDR(1,14597838,1,1,2) [2025-03-03 10:25:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597838,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:25:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597838,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:25:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597838,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:25:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597838,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:25:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597838', 'tblTempUsageDetail_20' ) start [2025-03-03 10:25:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597838', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:25:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:25:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:25:25] Production.INFO: ==7705== Releasing lock... [2025-03-03 10:25:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:25:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:26:17] Production.INFO: count ==409 [2025-03-03 10:26:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:26:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597843', 'tblTempUsageDetail_20' ) start [2025-03-03 10:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597843', 'tblTempUsageDetail_20' ) end [2025-03-03 10:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597843', 'tblTempVendorCDR_20' ) start [2025-03-03 10:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597843', 'tblTempVendorCDR_20' ) end [2025-03-03 10:26:17] Production.INFO: ProcessCDR(1,14597843,1,1,2) [2025-03-03 10:26:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597843,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:26:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597843,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:26:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597843,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:26:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597843,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:26:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597843', 'tblTempUsageDetail_20' ) start [2025-03-03 10:26:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597843', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:26:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:26:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:26:26] Production.INFO: ==7793== Releasing lock... [2025-03-03 10:26:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:26:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:27:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:27:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:27:16] Production.INFO: count ==409 [2025-03-03 10:27:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:27:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597848', 'tblTempUsageDetail_20' ) start [2025-03-03 10:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597848', 'tblTempUsageDetail_20' ) end [2025-03-03 10:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597848', 'tblTempVendorCDR_20' ) start [2025-03-03 10:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597848', 'tblTempVendorCDR_20' ) end [2025-03-03 10:27:17] Production.INFO: ProcessCDR(1,14597848,1,1,2) [2025-03-03 10:27:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597848,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:27:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597848,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:27:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597848,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:27:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597848,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:27:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597848', 'tblTempUsageDetail_20' ) start [2025-03-03 10:27:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597848', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:27:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:27:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:27:25] Production.INFO: ==7880== Releasing lock... [2025-03-03 10:27:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:27:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:28:17] Production.INFO: count ==409 [2025-03-03 10:28:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:28:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597853', 'tblTempUsageDetail_20' ) start [2025-03-03 10:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597853', 'tblTempUsageDetail_20' ) end [2025-03-03 10:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597853', 'tblTempVendorCDR_20' ) start [2025-03-03 10:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597853', 'tblTempVendorCDR_20' ) end [2025-03-03 10:28:17] Production.INFO: ProcessCDR(1,14597853,1,1,2) [2025-03-03 10:28:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597853,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:28:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597853,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:28:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597853,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:28:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597853,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:28:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597853', 'tblTempUsageDetail_20' ) start [2025-03-03 10:28:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597853', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:28:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:28:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:28:26] Production.INFO: ==7965== Releasing lock... [2025-03-03 10:28:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:28:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:29:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:29:16] Production.INFO: count ==409 [2025-03-03 10:29:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:29:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597858', 'tblTempUsageDetail_20' ) start [2025-03-03 10:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597858', 'tblTempUsageDetail_20' ) end [2025-03-03 10:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597858', 'tblTempVendorCDR_20' ) start [2025-03-03 10:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597858', 'tblTempVendorCDR_20' ) end [2025-03-03 10:29:17] Production.INFO: ProcessCDR(1,14597858,1,1,2) [2025-03-03 10:29:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597858,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:29:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597858,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:29:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597858,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:29:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597858,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:29:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597858', 'tblTempUsageDetail_20' ) start [2025-03-03 10:29:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597858', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:29:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:29:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:29:25] Production.INFO: ==8044== Releasing lock... [2025-03-03 10:29:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:29:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:30:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:30:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:30:18] Production.INFO: count ==409 [2025-03-03 10:30:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:30:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597864', 'tblTempUsageDetail_20' ) start [2025-03-03 10:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597864', 'tblTempUsageDetail_20' ) end [2025-03-03 10:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597864', 'tblTempVendorCDR_20' ) start [2025-03-03 10:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597864', 'tblTempVendorCDR_20' ) end [2025-03-03 10:30:18] Production.INFO: ProcessCDR(1,14597864,1,1,2) [2025-03-03 10:30:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597864,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:30:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597864,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:30:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597864,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:30:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597864,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:30:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597864', 'tblTempUsageDetail_20' ) start [2025-03-03 10:30:27] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597864', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:30:27] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:30:27] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:30:27] Production.INFO: ==8133== Releasing lock... [2025-03-03 10:30:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:30:27] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:31:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:31:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:31:17] Production.INFO: count ==409 [2025-03-03 10:31:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:31:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597869', 'tblTempUsageDetail_20' ) start [2025-03-03 10:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597869', 'tblTempUsageDetail_20' ) end [2025-03-03 10:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597869', 'tblTempVendorCDR_20' ) start [2025-03-03 10:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597869', 'tblTempVendorCDR_20' ) end [2025-03-03 10:31:17] Production.INFO: ProcessCDR(1,14597869,1,1,2) [2025-03-03 10:31:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597869,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:31:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597869,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:31:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597869,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:31:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597869,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:31:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597869', 'tblTempUsageDetail_20' ) start [2025-03-03 10:31:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597869', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:31:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:31:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:31:26] Production.INFO: ==8218== Releasing lock... [2025-03-03 10:31:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:31:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:32:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:32:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:32:17] Production.INFO: count ==409 [2025-03-03 10:32:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:32:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597874', 'tblTempUsageDetail_20' ) start [2025-03-03 10:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597874', 'tblTempUsageDetail_20' ) end [2025-03-03 10:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597874', 'tblTempVendorCDR_20' ) start [2025-03-03 10:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597874', 'tblTempVendorCDR_20' ) end [2025-03-03 10:32:17] Production.INFO: ProcessCDR(1,14597874,1,1,2) [2025-03-03 10:32:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597874,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:32:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597874,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:32:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597874,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:32:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597874,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:32:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597874', 'tblTempUsageDetail_20' ) start [2025-03-03 10:32:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597874', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:32:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:32:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:32:26] Production.INFO: ==8301== Releasing lock... [2025-03-03 10:32:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:32:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:33:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:33:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:33:17] Production.INFO: count ==409 [2025-03-03 10:33:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:33:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597879', 'tblTempUsageDetail_20' ) start [2025-03-03 10:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597879', 'tblTempUsageDetail_20' ) end [2025-03-03 10:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597879', 'tblTempVendorCDR_20' ) start [2025-03-03 10:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597879', 'tblTempVendorCDR_20' ) end [2025-03-03 10:33:17] Production.INFO: ProcessCDR(1,14597879,1,1,2) [2025-03-03 10:33:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597879,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:33:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597879,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:33:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597879,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:33:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597879,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:33:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597879', 'tblTempUsageDetail_20' ) start [2025-03-03 10:33:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597879', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:33:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:33:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:33:26] Production.INFO: ==8383== Releasing lock... [2025-03-03 10:33:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:33:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:34:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:34:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:34:17] Production.INFO: count ==409 [2025-03-03 10:34:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:34:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597884', 'tblTempUsageDetail_20' ) start [2025-03-03 10:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597884', 'tblTempUsageDetail_20' ) end [2025-03-03 10:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597884', 'tblTempVendorCDR_20' ) start [2025-03-03 10:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597884', 'tblTempVendorCDR_20' ) end [2025-03-03 10:34:17] Production.INFO: ProcessCDR(1,14597884,1,1,2) [2025-03-03 10:34:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597884,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:34:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597884,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:34:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597884,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:34:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597884,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:34:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597884', 'tblTempUsageDetail_20' ) start [2025-03-03 10:34:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597884', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:34:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:34:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:34:26] Production.INFO: ==8471== Releasing lock... [2025-03-03 10:34:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:34:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:35:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:35:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:35:17] Production.INFO: count ==409 [2025-03-03 10:35:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:35:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597889', 'tblTempUsageDetail_20' ) start [2025-03-03 10:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597889', 'tblTempUsageDetail_20' ) end [2025-03-03 10:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597889', 'tblTempVendorCDR_20' ) start [2025-03-03 10:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597889', 'tblTempVendorCDR_20' ) end [2025-03-03 10:35:17] Production.INFO: ProcessCDR(1,14597889,1,1,2) [2025-03-03 10:35:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597889,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:35:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597889,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:35:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597889,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:35:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597889,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:35:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597889', 'tblTempUsageDetail_20' ) start [2025-03-03 10:35:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597889', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:35:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:35:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:35:25] Production.INFO: ==8551== Releasing lock... [2025-03-03 10:35:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:35:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:36:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:36:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:36:17] Production.INFO: count ==409 [2025-03-03 10:36:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:36:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597894', 'tblTempUsageDetail_20' ) start [2025-03-03 10:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597894', 'tblTempUsageDetail_20' ) end [2025-03-03 10:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597894', 'tblTempVendorCDR_20' ) start [2025-03-03 10:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597894', 'tblTempVendorCDR_20' ) end [2025-03-03 10:36:17] Production.INFO: ProcessCDR(1,14597894,1,1,2) [2025-03-03 10:36:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597894,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:36:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597894,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:36:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597894,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:36:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597894,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:36:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597894', 'tblTempUsageDetail_20' ) start [2025-03-03 10:36:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597894', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:36:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:36:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:36:26] Production.INFO: ==8634== Releasing lock... [2025-03-03 10:36:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:36:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:37:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:37:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:37:17] Production.INFO: count ==409 [2025-03-03 10:37:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:37:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597899', 'tblTempUsageDetail_20' ) start [2025-03-03 10:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597899', 'tblTempUsageDetail_20' ) end [2025-03-03 10:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597899', 'tblTempVendorCDR_20' ) start [2025-03-03 10:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597899', 'tblTempVendorCDR_20' ) end [2025-03-03 10:37:17] Production.INFO: ProcessCDR(1,14597899,1,1,2) [2025-03-03 10:37:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597899,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:37:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597899,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:37:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597899,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:37:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597899,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:37:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597899', 'tblTempUsageDetail_20' ) start [2025-03-03 10:37:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597899', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:37:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:37:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:37:26] Production.INFO: ==8718== Releasing lock... [2025-03-03 10:37:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:37:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:38:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:38:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:38:16] Production.INFO: count ==409 [2025-03-03 10:38:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:38:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597904', 'tblTempUsageDetail_20' ) start [2025-03-03 10:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597904', 'tblTempUsageDetail_20' ) end [2025-03-03 10:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597904', 'tblTempVendorCDR_20' ) start [2025-03-03 10:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597904', 'tblTempVendorCDR_20' ) end [2025-03-03 10:38:16] Production.INFO: ProcessCDR(1,14597904,1,1,2) [2025-03-03 10:38:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597904,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:38:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597904,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:38:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597904,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:38:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597904,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:38:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597904', 'tblTempUsageDetail_20' ) start [2025-03-03 10:38:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597904', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:38:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:38:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:38:25] Production.INFO: ==8802== Releasing lock... [2025-03-03 10:38:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:38:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:39:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:39:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:39:17] Production.INFO: count ==409 [2025-03-03 10:39:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:39:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597909', 'tblTempUsageDetail_20' ) start [2025-03-03 10:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597909', 'tblTempUsageDetail_20' ) end [2025-03-03 10:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597909', 'tblTempVendorCDR_20' ) start [2025-03-03 10:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597909', 'tblTempVendorCDR_20' ) end [2025-03-03 10:39:17] Production.INFO: ProcessCDR(1,14597909,1,1,2) [2025-03-03 10:39:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597909,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:39:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597909,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:39:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597909,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:39:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597909,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:39:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597909', 'tblTempUsageDetail_20' ) start [2025-03-03 10:39:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597909', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:39:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:39:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:39:26] Production.INFO: ==8889== Releasing lock... [2025-03-03 10:39:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:39:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:40:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:40:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:40:18] Production.INFO: count ==409 [2025-03-03 10:40:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:40:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597915', 'tblTempUsageDetail_20' ) start [2025-03-03 10:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597915', 'tblTempUsageDetail_20' ) end [2025-03-03 10:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597915', 'tblTempVendorCDR_20' ) start [2025-03-03 10:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597915', 'tblTempVendorCDR_20' ) end [2025-03-03 10:40:18] Production.INFO: ProcessCDR(1,14597915,1,1,2) [2025-03-03 10:40:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597915,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:40:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597915,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:40:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597915,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:40:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597915,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:40:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597915', 'tblTempUsageDetail_20' ) start [2025-03-03 10:40:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597915', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:40:27] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:40:27] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:40:27] Production.INFO: ==9016== Releasing lock... [2025-03-03 10:40:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:40:27] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:41:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:41:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:41:16] Production.INFO: count ==409 [2025-03-03 10:41:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:41:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597920', 'tblTempUsageDetail_20' ) start [2025-03-03 10:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597920', 'tblTempUsageDetail_20' ) end [2025-03-03 10:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597920', 'tblTempVendorCDR_20' ) start [2025-03-03 10:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597920', 'tblTempVendorCDR_20' ) end [2025-03-03 10:41:17] Production.INFO: ProcessCDR(1,14597920,1,1,2) [2025-03-03 10:41:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597920,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:41:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597920,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:41:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597920,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:41:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597920,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:41:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597920', 'tblTempUsageDetail_20' ) start [2025-03-03 10:41:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597920', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:41:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:41:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:41:25] Production.INFO: ==9104== Releasing lock... [2025-03-03 10:41:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:41:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:42:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:42:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:42:16] Production.INFO: count ==409 [2025-03-03 10:42:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:42:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597925', 'tblTempUsageDetail_20' ) start [2025-03-03 10:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597925', 'tblTempUsageDetail_20' ) end [2025-03-03 10:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597925', 'tblTempVendorCDR_20' ) start [2025-03-03 10:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597925', 'tblTempVendorCDR_20' ) end [2025-03-03 10:42:17] Production.INFO: ProcessCDR(1,14597925,1,1,2) [2025-03-03 10:42:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597925,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:42:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597925,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:42:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597925,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:42:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597925,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:42:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597925', 'tblTempUsageDetail_20' ) start [2025-03-03 10:42:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597925', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:42:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:42:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:42:25] Production.INFO: ==9187== Releasing lock... [2025-03-03 10:42:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:42:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:43:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:43:17] Production.INFO: count ==409 [2025-03-03 10:43:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:43:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597930', 'tblTempUsageDetail_20' ) start [2025-03-03 10:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597930', 'tblTempUsageDetail_20' ) end [2025-03-03 10:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597930', 'tblTempVendorCDR_20' ) start [2025-03-03 10:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597930', 'tblTempVendorCDR_20' ) end [2025-03-03 10:43:17] Production.INFO: ProcessCDR(1,14597930,1,1,2) [2025-03-03 10:43:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597930,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:43:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597930,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:43:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597930,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:43:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597930,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:43:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597930', 'tblTempUsageDetail_20' ) start [2025-03-03 10:43:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597930', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:43:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:43:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:43:26] Production.INFO: ==9270== Releasing lock... [2025-03-03 10:43:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:43:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:44:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:44:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:44:16] Production.INFO: count ==409 [2025-03-03 10:44:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:44:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597935', 'tblTempUsageDetail_20' ) start [2025-03-03 10:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597935', 'tblTempUsageDetail_20' ) end [2025-03-03 10:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597935', 'tblTempVendorCDR_20' ) start [2025-03-03 10:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597935', 'tblTempVendorCDR_20' ) end [2025-03-03 10:44:16] Production.INFO: ProcessCDR(1,14597935,1,1,2) [2025-03-03 10:44:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597935,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:44:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597935,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:44:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597935,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:44:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597935,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:44:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597935', 'tblTempUsageDetail_20' ) start [2025-03-03 10:44:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597935', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:44:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:44:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:44:25] Production.INFO: ==9359== Releasing lock... [2025-03-03 10:44:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:44:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:45:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:45:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:45:17] Production.INFO: count ==409 [2025-03-03 10:45:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:45:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597940', 'tblTempUsageDetail_20' ) start [2025-03-03 10:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597940', 'tblTempUsageDetail_20' ) end [2025-03-03 10:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597940', 'tblTempVendorCDR_20' ) start [2025-03-03 10:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597940', 'tblTempVendorCDR_20' ) end [2025-03-03 10:45:17] Production.INFO: ProcessCDR(1,14597940,1,1,2) [2025-03-03 10:45:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597940,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:45:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597940,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:45:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597940,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:45:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597940,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:45:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597940', 'tblTempUsageDetail_20' ) start [2025-03-03 10:45:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597940', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:45:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:45:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:45:26] Production.INFO: ==9445== Releasing lock... [2025-03-03 10:45:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:45:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:46:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:46:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:46:17] Production.INFO: count ==409 [2025-03-03 10:46:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:46:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597945', 'tblTempUsageDetail_20' ) start [2025-03-03 10:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597945', 'tblTempUsageDetail_20' ) end [2025-03-03 10:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597945', 'tblTempVendorCDR_20' ) start [2025-03-03 10:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597945', 'tblTempVendorCDR_20' ) end [2025-03-03 10:46:17] Production.INFO: ProcessCDR(1,14597945,1,1,2) [2025-03-03 10:46:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597945,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:46:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597945,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:46:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597945,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:46:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597945,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:46:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597945', 'tblTempUsageDetail_20' ) start [2025-03-03 10:46:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597945', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:46:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:46:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:46:26] Production.INFO: ==9530== Releasing lock... [2025-03-03 10:46:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:46:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:47:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:47:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:47:17] Production.INFO: count ==409 [2025-03-03 10:47:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:47:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597950', 'tblTempUsageDetail_20' ) start [2025-03-03 10:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597950', 'tblTempUsageDetail_20' ) end [2025-03-03 10:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597950', 'tblTempVendorCDR_20' ) start [2025-03-03 10:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597950', 'tblTempVendorCDR_20' ) end [2025-03-03 10:47:18] Production.INFO: ProcessCDR(1,14597950,1,1,2) [2025-03-03 10:47:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597950,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:47:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597950,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:47:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597950,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:47:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597950,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:47:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597950', 'tblTempUsageDetail_20' ) start [2025-03-03 10:47:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597950', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:47:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:47:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:47:26] Production.INFO: ==9618== Releasing lock... [2025-03-03 10:47:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:47:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:48:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:48:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:48:16] Production.INFO: count ==409 [2025-03-03 10:48:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:48:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597955', 'tblTempUsageDetail_20' ) start [2025-03-03 10:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597955', 'tblTempUsageDetail_20' ) end [2025-03-03 10:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597955', 'tblTempVendorCDR_20' ) start [2025-03-03 10:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597955', 'tblTempVendorCDR_20' ) end [2025-03-03 10:48:16] Production.INFO: ProcessCDR(1,14597955,1,1,2) [2025-03-03 10:48:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597955,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:48:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597955,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:48:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597955,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:48:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597955,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:48:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597955', 'tblTempUsageDetail_20' ) start [2025-03-03 10:48:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597955', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:48:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:48:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:48:25] Production.INFO: ==9700== Releasing lock... [2025-03-03 10:48:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:48:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:49:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:49:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:49:17] Production.INFO: count ==409 [2025-03-03 10:49:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:49:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597960', 'tblTempUsageDetail_20' ) start [2025-03-03 10:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597960', 'tblTempUsageDetail_20' ) end [2025-03-03 10:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597960', 'tblTempVendorCDR_20' ) start [2025-03-03 10:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597960', 'tblTempVendorCDR_20' ) end [2025-03-03 10:49:18] Production.INFO: ProcessCDR(1,14597960,1,1,2) [2025-03-03 10:49:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597960,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:49:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597960,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:49:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597960,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:49:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597960,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:49:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597960', 'tblTempUsageDetail_20' ) start [2025-03-03 10:49:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597960', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:49:27] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:49:27] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:49:27] Production.INFO: ==9786== Releasing lock... [2025-03-03 10:49:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:49:27] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:50:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:50:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:50:18] Production.INFO: count ==409 [2025-03-03 10:50:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:50:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597966', 'tblTempUsageDetail_20' ) start [2025-03-03 10:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597966', 'tblTempUsageDetail_20' ) end [2025-03-03 10:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597966', 'tblTempVendorCDR_20' ) start [2025-03-03 10:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597966', 'tblTempVendorCDR_20' ) end [2025-03-03 10:50:18] Production.INFO: ProcessCDR(1,14597966,1,1,2) [2025-03-03 10:50:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597966,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:50:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597966,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:50:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597966,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:50:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597966,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:50:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597966', 'tblTempUsageDetail_20' ) start [2025-03-03 10:50:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597966', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:50:27] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:50:27] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:50:27] Production.INFO: ==9878== Releasing lock... [2025-03-03 10:50:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:50:27] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:51:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:51:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:51:17] Production.INFO: count ==409 [2025-03-03 10:51:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:51:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597971', 'tblTempUsageDetail_20' ) start [2025-03-03 10:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597971', 'tblTempUsageDetail_20' ) end [2025-03-03 10:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597971', 'tblTempVendorCDR_20' ) start [2025-03-03 10:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597971', 'tblTempVendorCDR_20' ) end [2025-03-03 10:51:17] Production.INFO: ProcessCDR(1,14597971,1,1,2) [2025-03-03 10:51:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597971,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:51:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597971,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:51:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597971,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:51:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597971,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:51:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597971', 'tblTempUsageDetail_20' ) start [2025-03-03 10:51:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597971', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:51:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:51:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:51:26] Production.INFO: ==9964== Releasing lock... [2025-03-03 10:51:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:51:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:52:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:52:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:52:17] Production.INFO: count ==409 [2025-03-03 10:52:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:52:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597976', 'tblTempUsageDetail_20' ) start [2025-03-03 10:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597976', 'tblTempUsageDetail_20' ) end [2025-03-03 10:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597976', 'tblTempVendorCDR_20' ) start [2025-03-03 10:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597976', 'tblTempVendorCDR_20' ) end [2025-03-03 10:52:17] Production.INFO: ProcessCDR(1,14597976,1,1,2) [2025-03-03 10:52:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597976,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:52:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597976,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:52:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597976,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:52:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597976,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:52:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597976', 'tblTempUsageDetail_20' ) start [2025-03-03 10:52:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597976', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:52:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:52:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:52:25] Production.INFO: ==10049== Releasing lock... [2025-03-03 10:52:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:52:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:53:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:53:17] Production.INFO: count ==409 [2025-03-03 10:53:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:53:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597981', 'tblTempUsageDetail_20' ) start [2025-03-03 10:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597981', 'tblTempUsageDetail_20' ) end [2025-03-03 10:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597981', 'tblTempVendorCDR_20' ) start [2025-03-03 10:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597981', 'tblTempVendorCDR_20' ) end [2025-03-03 10:53:17] Production.INFO: ProcessCDR(1,14597981,1,1,2) [2025-03-03 10:53:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597981,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:53:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597981,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:53:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597981,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:53:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597981,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:53:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597981', 'tblTempUsageDetail_20' ) start [2025-03-03 10:53:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597981', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:53:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:53:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:53:26] Production.INFO: ==10143== Releasing lock... [2025-03-03 10:53:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:53:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:54:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:54:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:54:17] Production.INFO: count ==409 [2025-03-03 10:54:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:54:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597986', 'tblTempUsageDetail_20' ) start [2025-03-03 10:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597986', 'tblTempUsageDetail_20' ) end [2025-03-03 10:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597986', 'tblTempVendorCDR_20' ) start [2025-03-03 10:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597986', 'tblTempVendorCDR_20' ) end [2025-03-03 10:54:17] Production.INFO: ProcessCDR(1,14597986,1,1,2) [2025-03-03 10:54:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597986,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:54:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597986,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:54:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597986,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:54:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597986,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:54:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597986', 'tblTempUsageDetail_20' ) start [2025-03-03 10:54:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597986', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:54:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:54:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:54:26] Production.INFO: ==10229== Releasing lock... [2025-03-03 10:54:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:54:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:55:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:55:17] Production.INFO: count ==409 [2025-03-03 10:55:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:55:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597991', 'tblTempUsageDetail_20' ) start [2025-03-03 10:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597991', 'tblTempUsageDetail_20' ) end [2025-03-03 10:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597991', 'tblTempVendorCDR_20' ) start [2025-03-03 10:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597991', 'tblTempVendorCDR_20' ) end [2025-03-03 10:55:17] Production.INFO: ProcessCDR(1,14597991,1,1,2) [2025-03-03 10:55:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597991,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:55:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597991,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:55:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597991,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:55:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597991,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:55:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597991', 'tblTempUsageDetail_20' ) start [2025-03-03 10:55:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597991', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:55:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:55:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:55:26] Production.INFO: ==10355== Releasing lock... [2025-03-03 10:55:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:55:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:56:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:56:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:56:17] Production.INFO: count ==409 [2025-03-03 10:56:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:56:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597996', 'tblTempUsageDetail_20' ) start [2025-03-03 10:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14597996', 'tblTempUsageDetail_20' ) end [2025-03-03 10:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597996', 'tblTempVendorCDR_20' ) start [2025-03-03 10:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14597996', 'tblTempVendorCDR_20' ) end [2025-03-03 10:56:17] Production.INFO: ProcessCDR(1,14597996,1,1,2) [2025-03-03 10:56:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14597996,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:56:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14597996,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:56:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14597996,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:56:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14597996,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:56:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14597996', 'tblTempUsageDetail_20' ) start [2025-03-03 10:56:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14597996', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:56:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:56:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:56:26] Production.INFO: ==10442== Releasing lock... [2025-03-03 10:56:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:56:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:57:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:57:17] Production.INFO: count ==409 [2025-03-03 10:57:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:57:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598001', 'tblTempUsageDetail_20' ) start [2025-03-03 10:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598001', 'tblTempUsageDetail_20' ) end [2025-03-03 10:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598001', 'tblTempVendorCDR_20' ) start [2025-03-03 10:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598001', 'tblTempVendorCDR_20' ) end [2025-03-03 10:57:17] Production.INFO: ProcessCDR(1,14598001,1,1,2) [2025-03-03 10:57:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598001,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:57:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598001,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:57:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598001,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:57:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598001,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:57:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598001', 'tblTempUsageDetail_20' ) start [2025-03-03 10:57:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598001', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:57:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:57:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:57:26] Production.INFO: ==10528== Releasing lock... [2025-03-03 10:57:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:57:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:58:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:58:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:58:17] Production.INFO: count ==409 [2025-03-03 10:58:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:58:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598006', 'tblTempUsageDetail_20' ) start [2025-03-03 10:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598006', 'tblTempUsageDetail_20' ) end [2025-03-03 10:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598006', 'tblTempVendorCDR_20' ) start [2025-03-03 10:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598006', 'tblTempVendorCDR_20' ) end [2025-03-03 10:58:17] Production.INFO: ProcessCDR(1,14598006,1,1,2) [2025-03-03 10:58:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598006,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:58:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598006,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:58:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598006,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:58:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598006,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:58:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598006', 'tblTempUsageDetail_20' ) start [2025-03-03 10:58:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598006', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:58:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:58:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:58:26] Production.INFO: ==10615== Releasing lock... [2025-03-03 10:58:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:58:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 10:59:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 10:59:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 10:59:17] Production.INFO: count ==409 [2025-03-03 10:59:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 10:59:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 10:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598011', 'tblTempUsageDetail_20' ) start [2025-03-03 10:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598011', 'tblTempUsageDetail_20' ) end [2025-03-03 10:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598011', 'tblTempVendorCDR_20' ) start [2025-03-03 10:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598011', 'tblTempVendorCDR_20' ) end [2025-03-03 10:59:17] Production.INFO: ProcessCDR(1,14598011,1,1,2) [2025-03-03 10:59:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598011,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:59:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598011,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 10:59:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598011,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:59:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598011,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 10:59:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598011', 'tblTempUsageDetail_20' ) start [2025-03-03 10:59:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598011', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 10:59:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 10:59:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 10:59:26] Production.INFO: ==10706== Releasing lock... [2025-03-03 10:59:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 10:59:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:00:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:00:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:00:17] Production.INFO: count ==409 [2025-03-03 11:00:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:00:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598017', 'tblTempUsageDetail_20' ) start [2025-03-03 11:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598017', 'tblTempUsageDetail_20' ) end [2025-03-03 11:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598017', 'tblTempVendorCDR_20' ) start [2025-03-03 11:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598017', 'tblTempVendorCDR_20' ) end [2025-03-03 11:00:17] Production.INFO: ProcessCDR(1,14598017,1,1,2) [2025-03-03 11:00:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598017,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:00:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598017,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:00:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598017,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:00:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598017,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:00:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598017', 'tblTempUsageDetail_20' ) start [2025-03-03 11:00:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598017', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:00:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:00:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:00:26] Production.INFO: ==10795== Releasing lock... [2025-03-03 11:00:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:00:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:01:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:01:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:01:17] Production.INFO: count ==409 [2025-03-03 11:01:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:01:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598022', 'tblTempUsageDetail_20' ) start [2025-03-03 11:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598022', 'tblTempUsageDetail_20' ) end [2025-03-03 11:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598022', 'tblTempVendorCDR_20' ) start [2025-03-03 11:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598022', 'tblTempVendorCDR_20' ) end [2025-03-03 11:01:18] Production.INFO: ProcessCDR(1,14598022,1,1,2) [2025-03-03 11:01:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598022,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:01:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598022,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:01:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598022,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:01:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598022,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:01:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598022', 'tblTempUsageDetail_20' ) start [2025-03-03 11:01:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598022', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:01:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:01:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:01:26] Production.INFO: ==10896== Releasing lock... [2025-03-03 11:01:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:01:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:02:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:02:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:02:17] Production.INFO: count ==409 [2025-03-03 11:02:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:02:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598027', 'tblTempUsageDetail_20' ) start [2025-03-03 11:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598027', 'tblTempUsageDetail_20' ) end [2025-03-03 11:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598027', 'tblTempVendorCDR_20' ) start [2025-03-03 11:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598027', 'tblTempVendorCDR_20' ) end [2025-03-03 11:02:17] Production.INFO: ProcessCDR(1,14598027,1,1,2) [2025-03-03 11:02:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598027,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:02:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598027,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:02:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598027,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:02:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598027,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:02:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598027', 'tblTempUsageDetail_20' ) start [2025-03-03 11:02:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598027', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:02:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:02:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:02:26] Production.INFO: ==11061== Releasing lock... [2025-03-03 11:02:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:02:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:03:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:03:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:03:19] Production.INFO: count ==409 [2025-03-03 11:03:19] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:03:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:03:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598032', 'tblTempUsageDetail_20' ) start [2025-03-03 11:03:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598032', 'tblTempUsageDetail_20' ) end [2025-03-03 11:03:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598032', 'tblTempVendorCDR_20' ) start [2025-03-03 11:03:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598032', 'tblTempVendorCDR_20' ) end [2025-03-03 11:03:19] Production.INFO: ProcessCDR(1,14598032,1,1,2) [2025-03-03 11:03:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598032,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:03:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598032,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:03:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598032,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:03:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598032,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:03:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598032', 'tblTempUsageDetail_20' ) start [2025-03-03 11:03:27] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598032', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:03:28] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:03:28] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:03:28] Production.INFO: ==11152== Releasing lock... [2025-03-03 11:03:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:03:28] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:04:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:04:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:04:17] Production.INFO: count ==409 [2025-03-03 11:04:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:04:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:04:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598037', 'tblTempUsageDetail_20' ) start [2025-03-03 11:04:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598037', 'tblTempUsageDetail_20' ) end [2025-03-03 11:04:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598037', 'tblTempVendorCDR_20' ) start [2025-03-03 11:04:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598037', 'tblTempVendorCDR_20' ) end [2025-03-03 11:04:18] Production.INFO: ProcessCDR(1,14598037,1,1,2) [2025-03-03 11:04:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598037,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:04:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598037,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:04:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598037,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:04:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598037,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:04:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598037', 'tblTempUsageDetail_20' ) start [2025-03-03 11:04:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598037', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:04:27] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:04:27] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:04:27] Production.INFO: ==11226== Releasing lock... [2025-03-03 11:04:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:04:27] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:05:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:05:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:05:18] Production.INFO: count ==409 [2025-03-03 11:05:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:05:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598042', 'tblTempUsageDetail_20' ) start [2025-03-03 11:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598042', 'tblTempUsageDetail_20' ) end [2025-03-03 11:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598042', 'tblTempVendorCDR_20' ) start [2025-03-03 11:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598042', 'tblTempVendorCDR_20' ) end [2025-03-03 11:05:18] Production.INFO: ProcessCDR(1,14598042,1,1,2) [2025-03-03 11:05:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598042,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:05:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598042,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:05:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598042,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:05:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598042,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:05:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598042', 'tblTempUsageDetail_20' ) start [2025-03-03 11:05:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598042', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:05:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:05:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:05:26] Production.INFO: ==11381== Releasing lock... [2025-03-03 11:05:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:05:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:06:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:06:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:06:17] Production.INFO: count ==409 [2025-03-03 11:06:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:06:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598047', 'tblTempUsageDetail_20' ) start [2025-03-03 11:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598047', 'tblTempUsageDetail_20' ) end [2025-03-03 11:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598047', 'tblTempVendorCDR_20' ) start [2025-03-03 11:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598047', 'tblTempVendorCDR_20' ) end [2025-03-03 11:06:17] Production.INFO: ProcessCDR(1,14598047,1,1,2) [2025-03-03 11:06:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598047,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:06:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598047,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:06:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598047,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:06:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598047,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:06:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598047', 'tblTempUsageDetail_20' ) start [2025-03-03 11:06:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598047', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:06:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:06:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:06:26] Production.INFO: ==11452== Releasing lock... [2025-03-03 11:06:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:06:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:07:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:07:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:07:17] Production.INFO: count ==409 [2025-03-03 11:07:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:07:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598052', 'tblTempUsageDetail_20' ) start [2025-03-03 11:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598052', 'tblTempUsageDetail_20' ) end [2025-03-03 11:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598052', 'tblTempVendorCDR_20' ) start [2025-03-03 11:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598052', 'tblTempVendorCDR_20' ) end [2025-03-03 11:07:17] Production.INFO: ProcessCDR(1,14598052,1,1,2) [2025-03-03 11:07:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598052,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:07:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598052,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:07:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598052,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:07:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598052,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:07:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598052', 'tblTempUsageDetail_20' ) start [2025-03-03 11:07:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598052', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:07:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:07:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:07:26] Production.INFO: ==11531== Releasing lock... [2025-03-03 11:07:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:07:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:08:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:08:19] Production.INFO: count ==409 [2025-03-03 11:08:19] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:08:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:08:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598057', 'tblTempUsageDetail_20' ) start [2025-03-03 11:08:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598057', 'tblTempUsageDetail_20' ) end [2025-03-03 11:08:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598057', 'tblTempVendorCDR_20' ) start [2025-03-03 11:08:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598057', 'tblTempVendorCDR_20' ) end [2025-03-03 11:08:19] Production.INFO: ProcessCDR(1,14598057,1,1,2) [2025-03-03 11:08:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598057,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:08:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598057,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:08:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598057,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:08:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598057,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:08:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598057', 'tblTempUsageDetail_20' ) start [2025-03-03 11:08:28] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598057', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:08:28] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:08:28] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:08:28] Production.INFO: ==11677== Releasing lock... [2025-03-03 11:08:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:08:28] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:09:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:09:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:09:18] Production.INFO: count ==409 [2025-03-03 11:09:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:09:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598062', 'tblTempUsageDetail_20' ) start [2025-03-03 11:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598062', 'tblTempUsageDetail_20' ) end [2025-03-03 11:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598062', 'tblTempVendorCDR_20' ) start [2025-03-03 11:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598062', 'tblTempVendorCDR_20' ) end [2025-03-03 11:09:18] Production.INFO: ProcessCDR(1,14598062,1,1,2) [2025-03-03 11:09:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598062,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:09:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598062,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:09:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598062,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:09:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598062,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:09:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598062', 'tblTempUsageDetail_20' ) start [2025-03-03 11:09:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598062', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:09:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:09:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:09:26] Production.INFO: ==11787== Releasing lock... [2025-03-03 11:09:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:09:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:10:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:10:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:10:17] Production.INFO: count ==409 [2025-03-03 11:10:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:10:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598068', 'tblTempUsageDetail_20' ) start [2025-03-03 11:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598068', 'tblTempUsageDetail_20' ) end [2025-03-03 11:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598068', 'tblTempVendorCDR_20' ) start [2025-03-03 11:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598068', 'tblTempVendorCDR_20' ) end [2025-03-03 11:10:18] Production.INFO: ProcessCDR(1,14598068,1,1,2) [2025-03-03 11:10:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598068,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:10:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598068,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:10:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598068,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:10:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598068,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:10:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598068', 'tblTempUsageDetail_20' ) start [2025-03-03 11:10:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598068', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:10:27] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:10:27] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:10:27] Production.INFO: ==11861== Releasing lock... [2025-03-03 11:10:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:10:27] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:11:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:11:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:11:16] Production.INFO: count ==409 [2025-03-03 11:11:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:11:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598073', 'tblTempUsageDetail_20' ) start [2025-03-03 11:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598073', 'tblTempUsageDetail_20' ) end [2025-03-03 11:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598073', 'tblTempVendorCDR_20' ) start [2025-03-03 11:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598073', 'tblTempVendorCDR_20' ) end [2025-03-03 11:11:17] Production.INFO: ProcessCDR(1,14598073,1,1,2) [2025-03-03 11:11:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598073,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:11:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598073,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:11:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598073,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:11:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598073,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:11:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598073', 'tblTempUsageDetail_20' ) start [2025-03-03 11:11:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598073', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:11:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:11:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:11:25] Production.INFO: ==11980== Releasing lock... [2025-03-03 11:11:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:11:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:12:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:12:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:12:17] Production.INFO: count ==409 [2025-03-03 11:12:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:12:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598078', 'tblTempUsageDetail_20' ) start [2025-03-03 11:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598078', 'tblTempUsageDetail_20' ) end [2025-03-03 11:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598078', 'tblTempVendorCDR_20' ) start [2025-03-03 11:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598078', 'tblTempVendorCDR_20' ) end [2025-03-03 11:12:17] Production.INFO: ProcessCDR(1,14598078,1,1,2) [2025-03-03 11:12:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598078,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:12:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598078,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:12:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598078,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:12:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598078,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:12:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598078', 'tblTempUsageDetail_20' ) start [2025-03-03 11:12:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598078', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:12:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:12:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:12:25] Production.INFO: ==12131== Releasing lock... [2025-03-03 11:12:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:12:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:13:17] Production.INFO: count ==409 [2025-03-03 11:13:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:13:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598083', 'tblTempUsageDetail_20' ) start [2025-03-03 11:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598083', 'tblTempUsageDetail_20' ) end [2025-03-03 11:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598083', 'tblTempVendorCDR_20' ) start [2025-03-03 11:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598083', 'tblTempVendorCDR_20' ) end [2025-03-03 11:13:17] Production.INFO: ProcessCDR(1,14598083,1,1,2) [2025-03-03 11:13:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598083,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:13:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598083,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:13:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598083,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:13:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598083,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:13:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598083', 'tblTempUsageDetail_20' ) start [2025-03-03 11:13:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598083', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:13:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:13:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:13:26] Production.INFO: ==12206== Releasing lock... [2025-03-03 11:13:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:13:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:14:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:14:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:14:17] Production.INFO: count ==409 [2025-03-03 11:14:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:14:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598088', 'tblTempUsageDetail_20' ) start [2025-03-03 11:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598088', 'tblTempUsageDetail_20' ) end [2025-03-03 11:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598088', 'tblTempVendorCDR_20' ) start [2025-03-03 11:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598088', 'tblTempVendorCDR_20' ) end [2025-03-03 11:14:18] Production.INFO: ProcessCDR(1,14598088,1,1,2) [2025-03-03 11:14:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598088,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:14:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598088,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:14:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598088,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:14:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598088,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:14:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598088', 'tblTempUsageDetail_20' ) start [2025-03-03 11:14:30] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598088', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:14:30] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:14:30] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:14:30] Production.INFO: ==12291== Releasing lock... [2025-03-03 11:14:30] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:14:30] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:15:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:15:17] Production.INFO: count ==409 [2025-03-03 11:15:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:15:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598093', 'tblTempUsageDetail_20' ) start [2025-03-03 11:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598093', 'tblTempUsageDetail_20' ) end [2025-03-03 11:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598093', 'tblTempVendorCDR_20' ) start [2025-03-03 11:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598093', 'tblTempVendorCDR_20' ) end [2025-03-03 11:15:17] Production.INFO: ProcessCDR(1,14598093,1,1,2) [2025-03-03 11:15:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598093,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:15:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598093,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:15:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598093,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:15:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598093,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:15:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598093', 'tblTempUsageDetail_20' ) start [2025-03-03 11:15:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598093', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:15:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:15:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:15:26] Production.INFO: ==12445== Releasing lock... [2025-03-03 11:15:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:15:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:16:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:16:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:16:17] Production.INFO: count ==409 [2025-03-03 11:16:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:16:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598098', 'tblTempUsageDetail_20' ) start [2025-03-03 11:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598098', 'tblTempUsageDetail_20' ) end [2025-03-03 11:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598098', 'tblTempVendorCDR_20' ) start [2025-03-03 11:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598098', 'tblTempVendorCDR_20' ) end [2025-03-03 11:16:17] Production.INFO: ProcessCDR(1,14598098,1,1,2) [2025-03-03 11:16:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598098,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:16:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598098,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:16:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598098,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:16:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598098,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:16:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598098', 'tblTempUsageDetail_20' ) start [2025-03-03 11:16:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598098', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:16:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:16:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:16:26] Production.INFO: ==12520== Releasing lock... [2025-03-03 11:16:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:16:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:17:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:17:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:17:17] Production.INFO: count ==409 [2025-03-03 11:17:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:17:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598103', 'tblTempUsageDetail_20' ) start [2025-03-03 11:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598103', 'tblTempUsageDetail_20' ) end [2025-03-03 11:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598103', 'tblTempVendorCDR_20' ) start [2025-03-03 11:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598103', 'tblTempVendorCDR_20' ) end [2025-03-03 11:17:17] Production.INFO: ProcessCDR(1,14598103,1,1,2) [2025-03-03 11:17:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598103,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:17:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598103,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:17:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598103,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:17:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598103,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:17:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598103', 'tblTempUsageDetail_20' ) start [2025-03-03 11:17:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598103', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:17:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:17:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:17:26] Production.INFO: ==12597== Releasing lock... [2025-03-03 11:17:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:17:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:18:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:18:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:18:18] Production.INFO: count ==409 [2025-03-03 11:18:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:18:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598108', 'tblTempUsageDetail_20' ) start [2025-03-03 11:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598108', 'tblTempUsageDetail_20' ) end [2025-03-03 11:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598108', 'tblTempVendorCDR_20' ) start [2025-03-03 11:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598108', 'tblTempVendorCDR_20' ) end [2025-03-03 11:18:18] Production.INFO: ProcessCDR(1,14598108,1,1,2) [2025-03-03 11:18:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598108,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:18:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598108,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:18:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598108,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:18:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598108,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:18:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598108', 'tblTempUsageDetail_20' ) start [2025-03-03 11:18:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598108', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:18:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:18:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:18:26] Production.INFO: ==12677== Releasing lock... [2025-03-03 11:18:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:18:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:19:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:19:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:19:17] Production.INFO: count ==409 [2025-03-03 11:19:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:19:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598113', 'tblTempUsageDetail_20' ) start [2025-03-03 11:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598113', 'tblTempUsageDetail_20' ) end [2025-03-03 11:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598113', 'tblTempVendorCDR_20' ) start [2025-03-03 11:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598113', 'tblTempVendorCDR_20' ) end [2025-03-03 11:19:17] Production.INFO: ProcessCDR(1,14598113,1,1,2) [2025-03-03 11:19:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598113,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:19:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598113,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:19:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598113,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:19:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598113,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:19:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598113', 'tblTempUsageDetail_20' ) start [2025-03-03 11:19:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598113', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:19:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:19:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:19:26] Production.INFO: ==12751== Releasing lock... [2025-03-03 11:19:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:19:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:20:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:20:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:20:18] Production.INFO: count ==409 [2025-03-03 11:20:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:20:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598119', 'tblTempUsageDetail_20' ) start [2025-03-03 11:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598119', 'tblTempUsageDetail_20' ) end [2025-03-03 11:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598119', 'tblTempVendorCDR_20' ) start [2025-03-03 11:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598119', 'tblTempVendorCDR_20' ) end [2025-03-03 11:20:18] Production.INFO: ProcessCDR(1,14598119,1,1,2) [2025-03-03 11:20:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598119,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:20:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598119,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:20:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598119,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:20:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598119,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:20:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598119', 'tblTempUsageDetail_20' ) start [2025-03-03 11:20:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598119', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:20:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:20:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:20:26] Production.INFO: ==12831== Releasing lock... [2025-03-03 11:20:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:20:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:21:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:21:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:21:17] Production.INFO: count ==409 [2025-03-03 11:21:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:21:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598124', 'tblTempUsageDetail_20' ) start [2025-03-03 11:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598124', 'tblTempUsageDetail_20' ) end [2025-03-03 11:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598124', 'tblTempVendorCDR_20' ) start [2025-03-03 11:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598124', 'tblTempVendorCDR_20' ) end [2025-03-03 11:21:17] Production.INFO: ProcessCDR(1,14598124,1,1,2) [2025-03-03 11:21:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598124,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:21:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598124,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:21:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598124,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:21:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598124,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:21:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598124', 'tblTempUsageDetail_20' ) start [2025-03-03 11:21:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598124', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:21:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:21:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:21:26] Production.INFO: ==12907== Releasing lock... [2025-03-03 11:21:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:21:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:22:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:22:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:22:16] Production.INFO: count ==409 [2025-03-03 11:22:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:22:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:22:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598129', 'tblTempUsageDetail_20' ) start [2025-03-03 11:22:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598129', 'tblTempUsageDetail_20' ) end [2025-03-03 11:22:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598129', 'tblTempVendorCDR_20' ) start [2025-03-03 11:22:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598129', 'tblTempVendorCDR_20' ) end [2025-03-03 11:22:16] Production.INFO: ProcessCDR(1,14598129,1,1,2) [2025-03-03 11:22:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598129,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:22:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598129,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:22:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598129,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:22:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598129,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:22:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598129', 'tblTempUsageDetail_20' ) start [2025-03-03 11:22:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598129', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:22:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:22:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:22:25] Production.INFO: ==12983== Releasing lock... [2025-03-03 11:22:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:22:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:23:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:23:17] Production.INFO: count ==409 [2025-03-03 11:23:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:23:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598134', 'tblTempUsageDetail_20' ) start [2025-03-03 11:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598134', 'tblTempUsageDetail_20' ) end [2025-03-03 11:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598134', 'tblTempVendorCDR_20' ) start [2025-03-03 11:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598134', 'tblTempVendorCDR_20' ) end [2025-03-03 11:23:17] Production.INFO: ProcessCDR(1,14598134,1,1,2) [2025-03-03 11:23:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598134,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:23:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598134,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:23:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598134,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:23:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598134,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:23:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598134', 'tblTempUsageDetail_20' ) start [2025-03-03 11:23:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598134', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:23:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:23:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:23:25] Production.INFO: ==13057== Releasing lock... [2025-03-03 11:23:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:23:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:24:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:24:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:24:17] Production.INFO: count ==409 [2025-03-03 11:24:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:24:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598139', 'tblTempUsageDetail_20' ) start [2025-03-03 11:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598139', 'tblTempUsageDetail_20' ) end [2025-03-03 11:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598139', 'tblTempVendorCDR_20' ) start [2025-03-03 11:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598139', 'tblTempVendorCDR_20' ) end [2025-03-03 11:24:17] Production.INFO: ProcessCDR(1,14598139,1,1,2) [2025-03-03 11:24:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598139,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:24:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598139,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:24:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598139,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:24:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598139,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:24:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598139', 'tblTempUsageDetail_20' ) start [2025-03-03 11:24:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598139', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:24:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:24:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:24:26] Production.INFO: ==13132== Releasing lock... [2025-03-03 11:24:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:24:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:25:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:25:17] Production.INFO: count ==409 [2025-03-03 11:25:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:25:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598144', 'tblTempUsageDetail_20' ) start [2025-03-03 11:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598144', 'tblTempUsageDetail_20' ) end [2025-03-03 11:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598144', 'tblTempVendorCDR_20' ) start [2025-03-03 11:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598144', 'tblTempVendorCDR_20' ) end [2025-03-03 11:25:17] Production.INFO: ProcessCDR(1,14598144,1,1,2) [2025-03-03 11:25:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598144,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:25:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598144,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:25:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598144,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:25:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598144,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:25:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598144', 'tblTempUsageDetail_20' ) start [2025-03-03 11:25:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598144', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:25:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:25:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:25:26] Production.INFO: ==13203== Releasing lock... [2025-03-03 11:25:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:25:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:26:17] Production.INFO: count ==409 [2025-03-03 11:26:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:26:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598149', 'tblTempUsageDetail_20' ) start [2025-03-03 11:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598149', 'tblTempUsageDetail_20' ) end [2025-03-03 11:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598149', 'tblTempVendorCDR_20' ) start [2025-03-03 11:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598149', 'tblTempVendorCDR_20' ) end [2025-03-03 11:26:17] Production.INFO: ProcessCDR(1,14598149,1,1,2) [2025-03-03 11:26:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598149,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:26:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598149,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:26:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598149,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:26:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598149,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:26:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598149', 'tblTempUsageDetail_20' ) start [2025-03-03 11:26:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598149', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:26:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:26:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:26:26] Production.INFO: ==13316== Releasing lock... [2025-03-03 11:26:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:26:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:27:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:27:17] Production.INFO: count ==409 [2025-03-03 11:27:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:27:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598154', 'tblTempUsageDetail_20' ) start [2025-03-03 11:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598154', 'tblTempUsageDetail_20' ) end [2025-03-03 11:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598154', 'tblTempVendorCDR_20' ) start [2025-03-03 11:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598154', 'tblTempVendorCDR_20' ) end [2025-03-03 11:27:17] Production.INFO: ProcessCDR(1,14598154,1,1,2) [2025-03-03 11:27:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598154,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:27:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598154,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:27:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598154,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:27:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598154,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:27:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598154', 'tblTempUsageDetail_20' ) start [2025-03-03 11:27:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598154', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:27:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:27:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:27:26] Production.INFO: ==13391== Releasing lock... [2025-03-03 11:27:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:27:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:28:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:28:17] Production.INFO: count ==409 [2025-03-03 11:28:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:28:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598159', 'tblTempUsageDetail_20' ) start [2025-03-03 11:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598159', 'tblTempUsageDetail_20' ) end [2025-03-03 11:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598159', 'tblTempVendorCDR_20' ) start [2025-03-03 11:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598159', 'tblTempVendorCDR_20' ) end [2025-03-03 11:28:17] Production.INFO: ProcessCDR(1,14598159,1,1,2) [2025-03-03 11:28:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598159,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:28:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598159,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:28:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598159,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:28:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598159,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:28:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598159', 'tblTempUsageDetail_20' ) start [2025-03-03 11:28:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598159', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:28:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:28:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:28:26] Production.INFO: ==13461== Releasing lock... [2025-03-03 11:28:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:28:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:29:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:29:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:29:17] Production.INFO: count ==409 [2025-03-03 11:29:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:29:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598163', 'tblTempUsageDetail_20' ) start [2025-03-03 11:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598163', 'tblTempUsageDetail_20' ) end [2025-03-03 11:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598163', 'tblTempVendorCDR_20' ) start [2025-03-03 11:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598163', 'tblTempVendorCDR_20' ) end [2025-03-03 11:29:17] Production.INFO: ProcessCDR(1,14598163,1,1,2) [2025-03-03 11:29:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598163,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:29:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598163,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:29:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598163,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:29:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598163,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:29:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598163', 'tblTempUsageDetail_20' ) start [2025-03-03 11:29:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598163', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:29:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:29:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:29:26] Production.INFO: ==13535== Releasing lock... [2025-03-03 11:29:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:29:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:30:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:30:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:30:18] Production.INFO: count ==409 [2025-03-03 11:30:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:30:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598170', 'tblTempUsageDetail_20' ) start [2025-03-03 11:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598170', 'tblTempUsageDetail_20' ) end [2025-03-03 11:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598170', 'tblTempVendorCDR_20' ) start [2025-03-03 11:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598170', 'tblTempVendorCDR_20' ) end [2025-03-03 11:30:18] Production.INFO: ProcessCDR(1,14598170,1,1,2) [2025-03-03 11:30:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598170,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:30:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598170,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:30:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598170,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:30:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598170,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:30:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598170', 'tblTempUsageDetail_20' ) start [2025-03-03 11:30:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598170', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:30:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:30:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:30:26] Production.INFO: ==13617== Releasing lock... [2025-03-03 11:30:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:30:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:31:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:31:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:31:17] Production.INFO: count ==409 [2025-03-03 11:31:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:31:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598175', 'tblTempUsageDetail_20' ) start [2025-03-03 11:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598175', 'tblTempUsageDetail_20' ) end [2025-03-03 11:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598175', 'tblTempVendorCDR_20' ) start [2025-03-03 11:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598175', 'tblTempVendorCDR_20' ) end [2025-03-03 11:31:17] Production.INFO: ProcessCDR(1,14598175,1,1,2) [2025-03-03 11:31:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598175,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:31:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598175,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:31:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598175,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:31:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598175,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:31:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598175', 'tblTempUsageDetail_20' ) start [2025-03-03 11:31:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598175', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:31:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:31:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:31:26] Production.INFO: ==13693== Releasing lock... [2025-03-03 11:31:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:31:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:32:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:32:17] Production.INFO: count ==409 [2025-03-03 11:32:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:32:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598180', 'tblTempUsageDetail_20' ) start [2025-03-03 11:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598180', 'tblTempUsageDetail_20' ) end [2025-03-03 11:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598180', 'tblTempVendorCDR_20' ) start [2025-03-03 11:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598180', 'tblTempVendorCDR_20' ) end [2025-03-03 11:32:17] Production.INFO: ProcessCDR(1,14598180,1,1,2) [2025-03-03 11:32:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598180,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:32:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598180,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:32:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598180,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:32:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598180,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:32:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598180', 'tblTempUsageDetail_20' ) start [2025-03-03 11:32:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598180', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:32:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:32:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:32:26] Production.INFO: ==13768== Releasing lock... [2025-03-03 11:32:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:32:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:33:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:33:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:33:16] Production.INFO: count ==409 [2025-03-03 11:33:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:33:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598185', 'tblTempUsageDetail_20' ) start [2025-03-03 11:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598185', 'tblTempUsageDetail_20' ) end [2025-03-03 11:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598185', 'tblTempVendorCDR_20' ) start [2025-03-03 11:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598185', 'tblTempVendorCDR_20' ) end [2025-03-03 11:33:17] Production.INFO: ProcessCDR(1,14598185,1,1,2) [2025-03-03 11:33:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598185,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:33:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598185,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:33:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598185,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:33:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598185,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:33:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598185', 'tblTempUsageDetail_20' ) start [2025-03-03 11:33:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598185', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:33:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:33:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:33:25] Production.INFO: ==13845== Releasing lock... [2025-03-03 11:33:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:33:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:34:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:34:17] Production.INFO: count ==409 [2025-03-03 11:34:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:34:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598190', 'tblTempUsageDetail_20' ) start [2025-03-03 11:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598190', 'tblTempUsageDetail_20' ) end [2025-03-03 11:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598190', 'tblTempVendorCDR_20' ) start [2025-03-03 11:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598190', 'tblTempVendorCDR_20' ) end [2025-03-03 11:34:17] Production.INFO: ProcessCDR(1,14598190,1,1,2) [2025-03-03 11:34:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598190,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:34:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598190,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:34:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598190,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:34:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598190,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:34:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598190', 'tblTempUsageDetail_20' ) start [2025-03-03 11:34:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598190', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:34:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:34:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:34:25] Production.INFO: ==13924== Releasing lock... [2025-03-03 11:34:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:34:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:35:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:35:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:35:16] Production.INFO: count ==409 [2025-03-03 11:35:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:35:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:35:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598195', 'tblTempUsageDetail_20' ) start [2025-03-03 11:35:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598195', 'tblTempUsageDetail_20' ) end [2025-03-03 11:35:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598195', 'tblTempVendorCDR_20' ) start [2025-03-03 11:35:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598195', 'tblTempVendorCDR_20' ) end [2025-03-03 11:35:16] Production.INFO: ProcessCDR(1,14598195,1,1,2) [2025-03-03 11:35:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598195,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:35:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598195,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:35:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598195,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:35:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598195,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:35:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598195', 'tblTempUsageDetail_20' ) start [2025-03-03 11:35:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598195', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:35:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:35:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:35:25] Production.INFO: ==14001== Releasing lock... [2025-03-03 11:35:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:35:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:36:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:36:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:36:16] Production.INFO: count ==409 [2025-03-03 11:36:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:36:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598200', 'tblTempUsageDetail_20' ) start [2025-03-03 11:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598200', 'tblTempUsageDetail_20' ) end [2025-03-03 11:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598200', 'tblTempVendorCDR_20' ) start [2025-03-03 11:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598200', 'tblTempVendorCDR_20' ) end [2025-03-03 11:36:17] Production.INFO: ProcessCDR(1,14598200,1,1,2) [2025-03-03 11:36:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598200,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:36:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598200,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:36:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598200,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:36:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598200,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:36:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598200', 'tblTempUsageDetail_20' ) start [2025-03-03 11:36:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598200', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:36:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:36:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:36:25] Production.INFO: ==14074== Releasing lock... [2025-03-03 11:36:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:36:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:37:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:37:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:37:17] Production.INFO: count ==409 [2025-03-03 11:37:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:37:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598204', 'tblTempUsageDetail_20' ) start [2025-03-03 11:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598204', 'tblTempUsageDetail_20' ) end [2025-03-03 11:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598204', 'tblTempVendorCDR_20' ) start [2025-03-03 11:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598204', 'tblTempVendorCDR_20' ) end [2025-03-03 11:37:17] Production.INFO: ProcessCDR(1,14598204,1,1,2) [2025-03-03 11:37:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598204,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:37:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598204,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:37:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598204,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:37:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598204,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:37:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598204', 'tblTempUsageDetail_20' ) start [2025-03-03 11:37:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598204', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:37:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:37:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:37:25] Production.INFO: ==14150== Releasing lock... [2025-03-03 11:37:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:37:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:38:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:38:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:38:17] Production.INFO: count ==409 [2025-03-03 11:38:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:38:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598210', 'tblTempUsageDetail_20' ) start [2025-03-03 11:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598210', 'tblTempUsageDetail_20' ) end [2025-03-03 11:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598210', 'tblTempVendorCDR_20' ) start [2025-03-03 11:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598210', 'tblTempVendorCDR_20' ) end [2025-03-03 11:38:17] Production.INFO: ProcessCDR(1,14598210,1,1,2) [2025-03-03 11:38:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598210,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:38:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598210,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:38:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598210,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:38:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598210,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:38:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598210', 'tblTempUsageDetail_20' ) start [2025-03-03 11:38:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598210', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:38:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:38:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:38:25] Production.INFO: ==14225== Releasing lock... [2025-03-03 11:38:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:38:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:39:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:39:18] Production.INFO: count ==409 [2025-03-03 11:39:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:39:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598215', 'tblTempUsageDetail_20' ) start [2025-03-03 11:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598215', 'tblTempUsageDetail_20' ) end [2025-03-03 11:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598215', 'tblTempVendorCDR_20' ) start [2025-03-03 11:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598215', 'tblTempVendorCDR_20' ) end [2025-03-03 11:39:18] Production.INFO: ProcessCDR(1,14598215,1,1,2) [2025-03-03 11:39:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598215,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:39:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598215,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:39:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598215,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:39:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598215,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:39:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598215', 'tblTempUsageDetail_20' ) start [2025-03-03 11:39:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598215', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:39:27] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:39:27] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:39:27] Production.INFO: ==14297== Releasing lock... [2025-03-03 11:39:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:39:27] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:40:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:40:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:40:18] Production.INFO: count ==409 [2025-03-03 11:40:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:40:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598221', 'tblTempUsageDetail_20' ) start [2025-03-03 11:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598221', 'tblTempUsageDetail_20' ) end [2025-03-03 11:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598221', 'tblTempVendorCDR_20' ) start [2025-03-03 11:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598221', 'tblTempVendorCDR_20' ) end [2025-03-03 11:40:18] Production.INFO: ProcessCDR(1,14598221,1,1,2) [2025-03-03 11:40:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598221,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:40:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598221,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:40:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598221,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:40:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598221,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:40:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598221', 'tblTempUsageDetail_20' ) start [2025-03-03 11:40:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598221', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:40:27] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:40:27] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:40:27] Production.INFO: ==14373== Releasing lock... [2025-03-03 11:40:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:40:27] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:41:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:41:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:41:16] Production.INFO: count ==409 [2025-03-03 11:41:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:41:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598226', 'tblTempUsageDetail_20' ) start [2025-03-03 11:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598226', 'tblTempUsageDetail_20' ) end [2025-03-03 11:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598226', 'tblTempVendorCDR_20' ) start [2025-03-03 11:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598226', 'tblTempVendorCDR_20' ) end [2025-03-03 11:41:17] Production.INFO: ProcessCDR(1,14598226,1,1,2) [2025-03-03 11:41:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598226,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:41:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598226,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:41:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598226,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:41:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598226,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:41:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598226', 'tblTempUsageDetail_20' ) start [2025-03-03 11:41:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598226', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:41:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:41:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:41:25] Production.INFO: ==14490== Releasing lock... [2025-03-03 11:41:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:41:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:42:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:42:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:42:17] Production.INFO: count ==409 [2025-03-03 11:42:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:42:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598231', 'tblTempUsageDetail_20' ) start [2025-03-03 11:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598231', 'tblTempUsageDetail_20' ) end [2025-03-03 11:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598231', 'tblTempVendorCDR_20' ) start [2025-03-03 11:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598231', 'tblTempVendorCDR_20' ) end [2025-03-03 11:42:17] Production.INFO: ProcessCDR(1,14598231,1,1,2) [2025-03-03 11:42:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598231,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:42:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598231,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:42:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598231,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:42:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598231,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:42:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598231', 'tblTempUsageDetail_20' ) start [2025-03-03 11:42:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598231', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:42:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:42:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:42:26] Production.INFO: ==14568== Releasing lock... [2025-03-03 11:42:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:42:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:43:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:43:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:43:17] Production.INFO: count ==409 [2025-03-03 11:43:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:43:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598236', 'tblTempUsageDetail_20' ) start [2025-03-03 11:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598236', 'tblTempUsageDetail_20' ) end [2025-03-03 11:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598236', 'tblTempVendorCDR_20' ) start [2025-03-03 11:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598236', 'tblTempVendorCDR_20' ) end [2025-03-03 11:43:17] Production.INFO: ProcessCDR(1,14598236,1,1,2) [2025-03-03 11:43:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598236,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:43:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598236,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:43:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598236,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:43:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598236,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:43:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598236', 'tblTempUsageDetail_20' ) start [2025-03-03 11:43:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598236', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:43:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:43:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:43:26] Production.INFO: ==14642== Releasing lock... [2025-03-03 11:43:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:43:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:44:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:44:17] Production.INFO: count ==409 [2025-03-03 11:44:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:44:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598241', 'tblTempUsageDetail_20' ) start [2025-03-03 11:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598241', 'tblTempUsageDetail_20' ) end [2025-03-03 11:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598241', 'tblTempVendorCDR_20' ) start [2025-03-03 11:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598241', 'tblTempVendorCDR_20' ) end [2025-03-03 11:44:17] Production.INFO: ProcessCDR(1,14598241,1,1,2) [2025-03-03 11:44:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598241,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:44:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598241,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:44:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598241,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:44:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598241,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:44:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598241', 'tblTempUsageDetail_20' ) start [2025-03-03 11:44:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598241', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:44:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:44:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:44:25] Production.INFO: ==14716== Releasing lock... [2025-03-03 11:44:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:44:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:45:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:45:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:45:17] Production.INFO: count ==409 [2025-03-03 11:45:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:45:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598246', 'tblTempUsageDetail_20' ) start [2025-03-03 11:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598246', 'tblTempUsageDetail_20' ) end [2025-03-03 11:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598246', 'tblTempVendorCDR_20' ) start [2025-03-03 11:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598246', 'tblTempVendorCDR_20' ) end [2025-03-03 11:45:17] Production.INFO: ProcessCDR(1,14598246,1,1,2) [2025-03-03 11:45:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598246,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:45:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598246,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:45:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598246,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:45:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598246,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:45:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598246', 'tblTempUsageDetail_20' ) start [2025-03-03 11:45:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598246', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:45:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:45:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:45:26] Production.INFO: ==14791== Releasing lock... [2025-03-03 11:45:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:45:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:46:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:46:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:46:17] Production.INFO: count ==409 [2025-03-03 11:46:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:46:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598251', 'tblTempUsageDetail_20' ) start [2025-03-03 11:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598251', 'tblTempUsageDetail_20' ) end [2025-03-03 11:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598251', 'tblTempVendorCDR_20' ) start [2025-03-03 11:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598251', 'tblTempVendorCDR_20' ) end [2025-03-03 11:46:17] Production.INFO: ProcessCDR(1,14598251,1,1,2) [2025-03-03 11:46:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598251,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:46:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598251,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:46:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598251,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:46:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598251,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:46:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598251', 'tblTempUsageDetail_20' ) start [2025-03-03 11:46:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598251', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:46:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:46:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:46:26] Production.INFO: ==14865== Releasing lock... [2025-03-03 11:46:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:46:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:47:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:47:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:47:17] Production.INFO: count ==409 [2025-03-03 11:47:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:47:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598256', 'tblTempUsageDetail_20' ) start [2025-03-03 11:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598256', 'tblTempUsageDetail_20' ) end [2025-03-03 11:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598256', 'tblTempVendorCDR_20' ) start [2025-03-03 11:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598256', 'tblTempVendorCDR_20' ) end [2025-03-03 11:47:17] Production.INFO: ProcessCDR(1,14598256,1,1,2) [2025-03-03 11:47:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598256,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:47:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598256,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:47:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598256,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:47:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598256,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:47:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598256', 'tblTempUsageDetail_20' ) start [2025-03-03 11:47:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598256', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:47:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:47:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:47:26] Production.INFO: ==14944== Releasing lock... [2025-03-03 11:47:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:47:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:48:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:48:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:48:16] Production.INFO: count ==409 [2025-03-03 11:48:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:48:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598261', 'tblTempUsageDetail_20' ) start [2025-03-03 11:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598261', 'tblTempUsageDetail_20' ) end [2025-03-03 11:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598261', 'tblTempVendorCDR_20' ) start [2025-03-03 11:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598261', 'tblTempVendorCDR_20' ) end [2025-03-03 11:48:17] Production.INFO: ProcessCDR(1,14598261,1,1,2) [2025-03-03 11:48:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598261,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:48:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598261,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:48:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598261,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:48:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598261,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:48:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598261', 'tblTempUsageDetail_20' ) start [2025-03-03 11:48:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598261', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:48:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:48:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:48:25] Production.INFO: ==15019== Releasing lock... [2025-03-03 11:48:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:48:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:49:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:49:17] Production.INFO: count ==409 [2025-03-03 11:49:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:49:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598266', 'tblTempUsageDetail_20' ) start [2025-03-03 11:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598266', 'tblTempUsageDetail_20' ) end [2025-03-03 11:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598266', 'tblTempVendorCDR_20' ) start [2025-03-03 11:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598266', 'tblTempVendorCDR_20' ) end [2025-03-03 11:49:17] Production.INFO: ProcessCDR(1,14598266,1,1,2) [2025-03-03 11:49:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598266,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:49:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598266,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:49:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598266,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:49:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598266,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:49:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598266', 'tblTempUsageDetail_20' ) start [2025-03-03 11:49:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598266', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:49:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:49:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:49:26] Production.INFO: ==15094== Releasing lock... [2025-03-03 11:49:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:49:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:50:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:50:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:50:18] Production.INFO: count ==409 [2025-03-03 11:50:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:50:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598272', 'tblTempUsageDetail_20' ) start [2025-03-03 11:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598272', 'tblTempUsageDetail_20' ) end [2025-03-03 11:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598272', 'tblTempVendorCDR_20' ) start [2025-03-03 11:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598272', 'tblTempVendorCDR_20' ) end [2025-03-03 11:50:18] Production.INFO: ProcessCDR(1,14598272,1,1,2) [2025-03-03 11:50:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598272,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:50:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598272,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:50:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598272,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:50:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598272,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:50:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598272', 'tblTempUsageDetail_20' ) start [2025-03-03 11:50:26] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598272', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:50:27] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:50:27] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:50:27] Production.INFO: ==15172== Releasing lock... [2025-03-03 11:50:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:50:27] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:51:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:51:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:51:17] Production.INFO: count ==409 [2025-03-03 11:51:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:51:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598277', 'tblTempUsageDetail_20' ) start [2025-03-03 11:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598277', 'tblTempUsageDetail_20' ) end [2025-03-03 11:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598277', 'tblTempVendorCDR_20' ) start [2025-03-03 11:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598277', 'tblTempVendorCDR_20' ) end [2025-03-03 11:51:17] Production.INFO: ProcessCDR(1,14598277,1,1,2) [2025-03-03 11:51:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598277,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:51:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598277,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:51:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598277,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:51:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598277,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:51:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598277', 'tblTempUsageDetail_20' ) start [2025-03-03 11:51:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598277', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:51:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:51:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:51:26] Production.INFO: ==15247== Releasing lock... [2025-03-03 11:51:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:51:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:52:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:52:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:52:17] Production.INFO: count ==409 [2025-03-03 11:52:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:52:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598282', 'tblTempUsageDetail_20' ) start [2025-03-03 11:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598282', 'tblTempUsageDetail_20' ) end [2025-03-03 11:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598282', 'tblTempVendorCDR_20' ) start [2025-03-03 11:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598282', 'tblTempVendorCDR_20' ) end [2025-03-03 11:52:17] Production.INFO: ProcessCDR(1,14598282,1,1,2) [2025-03-03 11:52:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598282,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:52:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598282,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:52:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598282,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:52:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598282,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:52:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598282', 'tblTempUsageDetail_20' ) start [2025-03-03 11:52:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598282', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:52:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:52:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:52:25] Production.INFO: ==15318== Releasing lock... [2025-03-03 11:52:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:52:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:53:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:53:17] Production.INFO: count ==409 [2025-03-03 11:53:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:53:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598287', 'tblTempUsageDetail_20' ) start [2025-03-03 11:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598287', 'tblTempUsageDetail_20' ) end [2025-03-03 11:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598287', 'tblTempVendorCDR_20' ) start [2025-03-03 11:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598287', 'tblTempVendorCDR_20' ) end [2025-03-03 11:53:17] Production.INFO: ProcessCDR(1,14598287,1,1,2) [2025-03-03 11:53:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598287,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:53:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598287,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:53:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598287,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:53:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598287,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:53:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598287', 'tblTempUsageDetail_20' ) start [2025-03-03 11:53:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598287', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:53:26] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:53:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:53:26] Production.INFO: ==15395== Releasing lock... [2025-03-03 11:53:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:53:26] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:54:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 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-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:54:17] Production.INFO: count ==409 [2025-03-03 11:54:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:54:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598292', 'tblTempUsageDetail_20' ) start [2025-03-03 11:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598292', 'tblTempUsageDetail_20' ) end [2025-03-03 11:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598292', 'tblTempVendorCDR_20' ) start [2025-03-03 11:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598292', 'tblTempVendorCDR_20' ) end [2025-03-03 11:54:17] Production.INFO: ProcessCDR(1,14598292,1,1,2) [2025-03-03 11:54:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598292,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:54:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598292,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:54:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598292,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:54:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598292,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:54:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598292', 'tblTempUsageDetail_20' ) start [2025-03-03 11:54:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598292', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:54:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:54:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:54:25] Production.INFO: ==15468== Releasing lock... [2025-03-03 11:54:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:54:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:55:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:55:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:55:16] Production.INFO: count ==409 [2025-03-03 11:55:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:55:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598297', 'tblTempUsageDetail_20' ) start [2025-03-03 11:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598297', 'tblTempUsageDetail_20' ) end [2025-03-03 11:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598297', 'tblTempVendorCDR_20' ) start [2025-03-03 11:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598297', 'tblTempVendorCDR_20' ) end [2025-03-03 11:55:17] Production.INFO: ProcessCDR(1,14598297,1,1,2) [2025-03-03 11:55:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598297,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:55:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598297,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:55:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598297,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:55:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598297,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:55:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598297', 'tblTempUsageDetail_20' ) start [2025-03-03 11:55:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14598297', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-03 11:55:25] Production.ERROR: **Email Sent Status 1 [2025-03-03 11:55:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-03 11:55:25] Production.INFO: ==15541== Releasing lock... [2025-03-03 11:55:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:55:25] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 11:56:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-03 11:56:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 20:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:56:17] Production.INFO: count ==409 [2025-03-03 11:56:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-03 11:56:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598302', 'tblTempUsageDetail_20' ) start [2025-03-03 11:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598302', 'tblTempUsageDetail_20' ) end [2025-03-03 11:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598302', 'tblTempVendorCDR_20' ) start [2025-03-03 11:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598302', 'tblTempVendorCDR_20' ) end [2025-03-03 11:56:17] Production.INFO: ProcessCDR(1,14598302,1,1,2) [2025-03-03 11:56:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598302,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:56:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598302,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:56:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598302,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:56:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598302,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:56:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598302', 'tblTempUsageDetail_20' ) start [2025-03-03 11:56:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598302', 'tblTempUsageDetail_20' ) end [2025-03-03 11:56:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 11:56:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 11:56:28] Production.INFO: ==15615== Releasing lock... [2025-03-03 11:56:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:56:28] Production.INFO: 33.5 MB #Memory Used# [2025-03-03 11:57:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 20:49:05 [end_date_ymd] => 2025-03-02 23:49:05 [RateCDR] => 1 ) [2025-03-03 11:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 20:49:05' and `end` < '2025-03-02 23:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 11:57:18] Production.INFO: count ==268 [2025-03-03 11:57:18] Production.ERROR: pbx CDR StartTime 2025-03-02 20:49:05 - End Time 2025-03-02 23:49:05 [2025-03-03 11:57:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598307', 'tblTempUsageDetail_20' ) start [2025-03-03 11:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598307', 'tblTempUsageDetail_20' ) end [2025-03-03 11:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598307', 'tblTempVendorCDR_20' ) start [2025-03-03 11:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598307', 'tblTempVendorCDR_20' ) end [2025-03-03 11:57:18] Production.INFO: ProcessCDR(1,14598307,1,1,2) [2025-03-03 11:57:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598307,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:57:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598307,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:57:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598307,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:57:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598307,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:57:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598307', 'tblTempUsageDetail_20' ) start [2025-03-03 11:57:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598307', 'tblTempUsageDetail_20' ) end [2025-03-03 11:57:25] Production.ERROR: pbx prc_insertCDR start [2025-03-03 11:57:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 11:57:26] Production.INFO: ==15731== Releasing lock... [2025-03-03 11:57:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:57:26] Production.INFO: 30.5 MB #Memory Used# [2025-03-03 11:58:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 23:49:05 [end_date_ymd] => 2025-03-03 02:49:05 [RateCDR] => 1 ) [2025-03-03 11:58:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 23:49:05' and `end` < '2025-03-03 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-03 11:58:19] Production.INFO: count ==463 [2025-03-03 11:58:19] Production.ERROR: pbx CDR StartTime 2025-03-02 23:49:05 - End Time 2025-03-03 02:49:05 [2025-03-03 11:58:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:58:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598312', 'tblTempUsageDetail_20' ) start [2025-03-03 11:58:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598312', 'tblTempUsageDetail_20' ) end [2025-03-03 11:58:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598312', 'tblTempVendorCDR_20' ) start [2025-03-03 11:58:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598312', 'tblTempVendorCDR_20' ) end [2025-03-03 11:58:19] Production.INFO: ProcessCDR(1,14598312,1,1,2) [2025-03-03 11:58:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598312,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:58:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598312,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:58:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598312,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:58:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598312,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:58:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598312', 'tblTempUsageDetail_20' ) start [2025-03-03 11:58:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598312', 'tblTempUsageDetail_20' ) end [2025-03-03 11:58:25] Production.ERROR: pbx prc_insertCDR start [2025-03-03 11:58:25] Production.ERROR: pbx prc_insertCDR end [2025-03-03 11:58:25] Production.INFO: ==15833== Releasing lock... [2025-03-03 11:58:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:58:25] Production.INFO: 32.25 MB #Memory Used# [2025-03-03 11:59:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 02:49:05 [end_date_ymd] => 2025-03-03 05:49:05 [RateCDR] => 1 ) [2025-03-03 11: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-03 02:49:05' and `end` < '2025-03-03 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-03 11:59:18] Production.INFO: count ==165 [2025-03-03 11:59:18] Production.ERROR: pbx CDR StartTime 2025-03-03 02:49:05 - End Time 2025-03-03 05:49:05 [2025-03-03 11:59:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 11:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598317', 'tblTempUsageDetail_20' ) start [2025-03-03 11:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598317', 'tblTempUsageDetail_20' ) end [2025-03-03 11:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598317', 'tblTempVendorCDR_20' ) start [2025-03-03 11:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598317', 'tblTempVendorCDR_20' ) end [2025-03-03 11:59:18] Production.INFO: ProcessCDR(1,14598317,1,1,2) [2025-03-03 11:59:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598317,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:59:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598317,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 11:59:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598317,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:59:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598317,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 11:59:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598317', 'tblTempUsageDetail_20' ) start [2025-03-03 11:59:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598317', 'tblTempUsageDetail_20' ) end [2025-03-03 11:59:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 11:59:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 11:59:23] Production.INFO: ==15906== Releasing lock... [2025-03-03 11:59:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 11:59:23] Production.INFO: 28.75 MB #Memory Used# [2025-03-03 12:00:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 05:49:05 [end_date_ymd] => 2025-03-03 08:49:05 [RateCDR] => 1 ) [2025-03-03 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-03 05:49:05' and `end` < '2025-03-03 08:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 12:00:19] Production.INFO: count ==798 [2025-03-03 12:00:19] Production.ERROR: pbx CDR StartTime 2025-03-03 05:49:05 - End Time 2025-03-03 08:49:05 [2025-03-03 12:00:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:00:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598323', 'tblTempUsageDetail_20' ) start [2025-03-03 12:00:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598323', 'tblTempUsageDetail_20' ) end [2025-03-03 12:00:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598323', 'tblTempVendorCDR_20' ) start [2025-03-03 12:00:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598323', 'tblTempVendorCDR_20' ) end [2025-03-03 12:00:19] Production.INFO: ProcessCDR(1,14598323,1,1,2) [2025-03-03 12:00:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598323,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:00:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598323,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:00:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598323,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:00:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598323,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:00:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598323', 'tblTempUsageDetail_20' ) start [2025-03-03 12:00:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598323', 'tblTempUsageDetail_20' ) end [2025-03-03 12:00:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:00:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:00:26] Production.INFO: ==15984== Releasing lock... [2025-03-03 12:00:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:00:26] Production.INFO: 34.5 MB #Memory Used# [2025-03-03 12:01:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 08:49:05 [end_date_ymd] => 2025-03-03 11:49:05 [RateCDR] => 1 ) [2025-03-03 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-03 08:49:05' and `end` < '2025-03-03 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-03 12:01:19] Production.INFO: count ==5692 [2025-03-03 12:01:22] Production.ERROR: pbx CDR StartTime 2025-03-03 08:49:05 - End Time 2025-03-03 11:49:05 [2025-03-03 12:01:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:01:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598328', 'tblTempUsageDetail_20' ) start [2025-03-03 12:01:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598328', 'tblTempUsageDetail_20' ) end [2025-03-03 12:01:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598328', 'tblTempVendorCDR_20' ) start [2025-03-03 12:01:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598328', 'tblTempVendorCDR_20' ) end [2025-03-03 12:01:22] Production.INFO: ProcessCDR(1,14598328,1,1,2) [2025-03-03 12:01:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598328,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:01:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598328,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:01:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598328,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:01:31] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598328,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:01:31] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598328', 'tblTempUsageDetail_20' ) start [2025-03-03 12:01:36] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598328', 'tblTempUsageDetail_20' ) end [2025-03-03 12:01:36] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:01:42] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:01:42] Production.INFO: ==16088== Releasing lock... [2025-03-03 12:01:42] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:01:42] Production.INFO: 70.5 MB #Memory Used# [2025-03-03 12:02:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:02:06 [end_date_ymd] => 2025-03-03 12:02:06 [RateCDR] => 1 ) [2025-03-03 12:02:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 09:02:06' and `end` < '2025-03-03 12:02:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 12:02:19] Production.INFO: count ==6084 [2025-03-03 12:02:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:02:06 - End Time 2025-03-03 12:02:06 [2025-03-03 12:02:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:02:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598333', 'tblTempUsageDetail_20' ) start [2025-03-03 12:02:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598333', 'tblTempUsageDetail_20' ) end [2025-03-03 12:02:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598333', 'tblTempVendorCDR_20' ) start [2025-03-03 12:02:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598333', 'tblTempVendorCDR_20' ) end [2025-03-03 12:02:22] Production.INFO: ProcessCDR(1,14598333,1,1,2) [2025-03-03 12:02:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598333,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:02:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598333,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:02:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598333,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:02:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598333,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:02:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598333', 'tblTempUsageDetail_20' ) start [2025-03-03 12:02:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598333', 'tblTempUsageDetail_20' ) end [2025-03-03 12:02:29] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:02:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:02:29] Production.INFO: ==16162== Releasing lock... [2025-03-03 12:02:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:02:29] Production.INFO: 73.5 MB #Memory Used# [2025-03-03 12:03:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:03:06 [end_date_ymd] => 2025-03-03 12:03:06 [RateCDR] => 1 ) [2025-03-03 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-03 09:03:06' and `end` < '2025-03-03 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-03 12:03:19] Production.INFO: count ==6111 [2025-03-03 12:03:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:03:06 - End Time 2025-03-03 12:03:06 [2025-03-03 12:03:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:03:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598338', 'tblTempUsageDetail_20' ) start [2025-03-03 12:03:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598338', 'tblTempUsageDetail_20' ) end [2025-03-03 12:03:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598338', 'tblTempVendorCDR_20' ) start [2025-03-03 12:03:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598338', 'tblTempVendorCDR_20' ) end [2025-03-03 12:03:22] Production.INFO: ProcessCDR(1,14598338,1,1,2) [2025-03-03 12:03:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598338,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:03:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598338,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:03:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598338,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:03:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598338,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:03:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598338', 'tblTempUsageDetail_20' ) start [2025-03-03 12:03:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598338', 'tblTempUsageDetail_20' ) end [2025-03-03 12:03:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:03:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:03:28] Production.INFO: ==16236== Releasing lock... [2025-03-03 12:03:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:03:28] Production.INFO: 73.75 MB #Memory Used# [2025-03-03 12:04:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:04:06 [end_date_ymd] => 2025-03-03 12:04:06 [RateCDR] => 1 ) [2025-03-03 12:04:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 09:04:06' and `end` < '2025-03-03 12:04:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 12:04:20] Production.INFO: count ==6117 [2025-03-03 12:04:23] Production.ERROR: pbx CDR StartTime 2025-03-03 09:04:06 - End Time 2025-03-03 12:04:06 [2025-03-03 12:04:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:04:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598343', 'tblTempUsageDetail_20' ) start [2025-03-03 12:04:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598343', 'tblTempUsageDetail_20' ) end [2025-03-03 12:04:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598343', 'tblTempVendorCDR_20' ) start [2025-03-03 12:04:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598343', 'tblTempVendorCDR_20' ) end [2025-03-03 12:04:23] Production.INFO: ProcessCDR(1,14598343,1,1,2) [2025-03-03 12:04:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598343,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:04:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598343,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:04:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598343,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:04:29] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598343,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:04:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598343', 'tblTempUsageDetail_20' ) start [2025-03-03 12:04:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598343', 'tblTempUsageDetail_20' ) end [2025-03-03 12:04:29] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:04:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:04:29] Production.INFO: ==16310== Releasing lock... [2025-03-03 12:04:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:04:29] Production.INFO: 73.75 MB #Memory Used# [2025-03-03 12:05:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:05:06 [end_date_ymd] => 2025-03-03 12:05:06 [RateCDR] => 1 ) [2025-03-03 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-03 09:05:06' and `end` < '2025-03-03 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-03 12:05:20] Production.INFO: count ==6131 [2025-03-03 12:05:23] Production.ERROR: pbx CDR StartTime 2025-03-03 09:05:06 - End Time 2025-03-03 12:05:06 [2025-03-03 12:05:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:05:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598348', 'tblTempUsageDetail_20' ) start [2025-03-03 12:05:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598348', 'tblTempUsageDetail_20' ) end [2025-03-03 12:05:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598348', 'tblTempVendorCDR_20' ) start [2025-03-03 12:05:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598348', 'tblTempVendorCDR_20' ) end [2025-03-03 12:05:23] Production.INFO: ProcessCDR(1,14598348,1,1,2) [2025-03-03 12:05:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598348,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:05:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598348,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:05:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598348,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:05:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598348,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:05:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598348', 'tblTempUsageDetail_20' ) start [2025-03-03 12:05:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598348', 'tblTempUsageDetail_20' ) end [2025-03-03 12:05:29] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:05:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:05:29] Production.INFO: ==16384== Releasing lock... [2025-03-03 12:05:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:05:29] Production.INFO: 74 MB #Memory Used# [2025-03-03 12:06:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:06:05 [end_date_ymd] => 2025-03-03 12:06:05 [RateCDR] => 1 ) [2025-03-03 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-03 09:06:05' and `end` < '2025-03-03 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-03 12:06:19] Production.INFO: count ==6136 [2025-03-03 12:06:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:06:05 - End Time 2025-03-03 12:06:05 [2025-03-03 12:06:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:06:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598353', 'tblTempUsageDetail_20' ) start [2025-03-03 12:06:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598353', 'tblTempUsageDetail_20' ) end [2025-03-03 12:06:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598353', 'tblTempVendorCDR_20' ) start [2025-03-03 12:06:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598353', 'tblTempVendorCDR_20' ) end [2025-03-03 12:06:22] Production.INFO: ProcessCDR(1,14598353,1,1,2) [2025-03-03 12:06:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598353,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:06:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598353,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:06:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598353,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:06:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598353,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:06:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598353', 'tblTempUsageDetail_20' ) start [2025-03-03 12:06:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598353', 'tblTempUsageDetail_20' ) end [2025-03-03 12:06:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:06:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:06:28] Production.INFO: ==16463== Releasing lock... [2025-03-03 12:06:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:06:28] Production.INFO: 74 MB #Memory Used# [2025-03-03 12:07:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:07:06 [end_date_ymd] => 2025-03-03 12:07:06 [RateCDR] => 1 ) [2025-03-03 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-03 09:07:06' and `end` < '2025-03-03 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-03 12:07:20] Production.INFO: count ==6214 [2025-03-03 12:07:23] Production.ERROR: pbx CDR StartTime 2025-03-03 09:07:06 - End Time 2025-03-03 12:07:06 [2025-03-03 12:07:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:07:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598358', 'tblTempUsageDetail_20' ) start [2025-03-03 12:07:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598358', 'tblTempUsageDetail_20' ) end [2025-03-03 12:07:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598358', 'tblTempVendorCDR_20' ) start [2025-03-03 12:07:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598358', 'tblTempVendorCDR_20' ) end [2025-03-03 12:07:23] Production.INFO: ProcessCDR(1,14598358,1,1,2) [2025-03-03 12:07:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598358,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:07:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598358,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:07:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598358,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:07:29] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598358,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:07:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598358', 'tblTempUsageDetail_20' ) start [2025-03-03 12:07:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598358', 'tblTempUsageDetail_20' ) end [2025-03-03 12:07:29] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:07:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:07:29] Production.INFO: ==16537== Releasing lock... [2025-03-03 12:07:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:07:29] Production.INFO: 74.5 MB #Memory Used# [2025-03-03 12:08:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:08:05 [end_date_ymd] => 2025-03-03 12:08:05 [RateCDR] => 1 ) [2025-03-03 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-03 09:08:05' and `end` < '2025-03-03 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-03 12:08:18] Production.INFO: count ==6133 [2025-03-03 12:08:21] Production.ERROR: pbx CDR StartTime 2025-03-03 09:08:05 - End Time 2025-03-03 12:08:05 [2025-03-03 12:08:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:08:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598363', 'tblTempUsageDetail_20' ) start [2025-03-03 12:08:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598363', 'tblTempUsageDetail_20' ) end [2025-03-03 12:08:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598363', 'tblTempVendorCDR_20' ) start [2025-03-03 12:08:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598363', 'tblTempVendorCDR_20' ) end [2025-03-03 12:08:22] Production.INFO: ProcessCDR(1,14598363,1,1,2) [2025-03-03 12:08:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598363,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:08:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598363,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:08:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598363,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:08:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598363,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:08:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598363', 'tblTempUsageDetail_20' ) start [2025-03-03 12:08:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598363', 'tblTempUsageDetail_20' ) end [2025-03-03 12:08:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:08:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:08:27] Production.INFO: ==16611== Releasing lock... [2025-03-03 12:08:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:08:27] Production.INFO: 74 MB #Memory Used# [2025-03-03 12:09:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:09:05 [end_date_ymd] => 2025-03-03 12:09:05 [RateCDR] => 1 ) [2025-03-03 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-03 09:09:05' and `end` < '2025-03-03 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-03 12:09:19] Production.INFO: count ==6129 [2025-03-03 12:09:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:09:05 - End Time 2025-03-03 12:09:05 [2025-03-03 12:09:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:09:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598368', 'tblTempUsageDetail_20' ) start [2025-03-03 12:09:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598368', 'tblTempUsageDetail_20' ) end [2025-03-03 12:09:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598368', 'tblTempVendorCDR_20' ) start [2025-03-03 12:09:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598368', 'tblTempVendorCDR_20' ) end [2025-03-03 12:09:22] Production.INFO: ProcessCDR(1,14598368,1,1,2) [2025-03-03 12:09:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598368,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:09:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598368,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:09:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598368,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:09:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598368,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:09:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598368', 'tblTempUsageDetail_20' ) start [2025-03-03 12:09:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598368', 'tblTempUsageDetail_20' ) end [2025-03-03 12:09:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:09:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:09:27] Production.INFO: ==16682== Releasing lock... [2025-03-03 12:09:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:09:27] Production.INFO: 74 MB #Memory Used# [2025-03-03 12:10:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:10:06 [end_date_ymd] => 2025-03-03 12:10:06 [RateCDR] => 1 ) [2025-03-03 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-03 09:10:06' and `end` < '2025-03-03 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-03 12:10:20] Production.INFO: count ==6130 [2025-03-03 12:10:23] Production.ERROR: pbx CDR StartTime 2025-03-03 09:10:06 - End Time 2025-03-03 12:10:06 [2025-03-03 12:10:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:10:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598374', 'tblTempUsageDetail_20' ) start [2025-03-03 12:10:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598374', 'tblTempUsageDetail_20' ) end [2025-03-03 12:10:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598374', 'tblTempVendorCDR_20' ) start [2025-03-03 12:10:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598374', 'tblTempVendorCDR_20' ) end [2025-03-03 12:10:23] Production.INFO: ProcessCDR(1,14598374,1,1,2) [2025-03-03 12:10:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598374,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:10:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598374,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:10:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598374,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:10:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598374,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:10:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598374', 'tblTempUsageDetail_20' ) start [2025-03-03 12:10:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598374', 'tblTempUsageDetail_20' ) end [2025-03-03 12:10:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:10:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:10:28] Production.INFO: ==16757== Releasing lock... [2025-03-03 12:10:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:10:28] Production.INFO: 74 MB #Memory Used# [2025-03-03 12:11:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:11:05 [end_date_ymd] => 2025-03-03 12:11:05 [RateCDR] => 1 ) [2025-03-03 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-03 09:11:05' and `end` < '2025-03-03 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-03 12:11:19] Production.INFO: count ==6137 [2025-03-03 12:11:21] Production.ERROR: pbx CDR StartTime 2025-03-03 09:11:05 - End Time 2025-03-03 12:11:05 [2025-03-03 12:11:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:11:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598379', 'tblTempUsageDetail_20' ) start [2025-03-03 12:11:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598379', 'tblTempUsageDetail_20' ) end [2025-03-03 12:11:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598379', 'tblTempVendorCDR_20' ) start [2025-03-03 12:11:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598379', 'tblTempVendorCDR_20' ) end [2025-03-03 12:11:22] Production.INFO: ProcessCDR(1,14598379,1,1,2) [2025-03-03 12:11:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598379,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:11:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598379,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:11:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598379,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:11:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598379,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:11:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598379', 'tblTempUsageDetail_20' ) start [2025-03-03 12:11:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598379', 'tblTempUsageDetail_20' ) end [2025-03-03 12:11:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:11:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:11:27] Production.INFO: ==16829== Releasing lock... [2025-03-03 12:11:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:11:27] Production.INFO: 74 MB #Memory Used# [2025-03-03 12:12:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:12:06 [end_date_ymd] => 2025-03-03 12:12:06 [RateCDR] => 1 ) [2025-03-03 12: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-03 09:12:06' and `end` < '2025-03-03 12: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-03 12:12:19] Production.INFO: count ==6122 [2025-03-03 12:12:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:12:06 - End Time 2025-03-03 12:12:06 [2025-03-03 12:12:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:12:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598384', 'tblTempUsageDetail_20' ) start [2025-03-03 12:12:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598384', 'tblTempUsageDetail_20' ) end [2025-03-03 12:12:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598384', 'tblTempVendorCDR_20' ) start [2025-03-03 12:12:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598384', 'tblTempVendorCDR_20' ) end [2025-03-03 12:12:22] Production.INFO: ProcessCDR(1,14598384,1,1,2) [2025-03-03 12:12:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598384,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:12:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598384,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:12:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598384,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:12:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598384,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:12:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598384', 'tblTempUsageDetail_20' ) start [2025-03-03 12:12:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598384', 'tblTempUsageDetail_20' ) end [2025-03-03 12:12:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:12:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:12:27] Production.INFO: ==16941== Releasing lock... [2025-03-03 12:12:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:12:27] Production.INFO: 73.75 MB #Memory Used# [2025-03-03 12:13:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:13:06 [end_date_ymd] => 2025-03-03 12:13:06 [RateCDR] => 1 ) [2025-03-03 12: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-03 09:13:06' and `end` < '2025-03-03 12: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-03 12:13:19] Production.INFO: count ==6098 [2025-03-03 12:13:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:13:06 - End Time 2025-03-03 12:13:06 [2025-03-03 12:13:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:13:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598389', 'tblTempUsageDetail_20' ) start [2025-03-03 12:13:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598389', 'tblTempUsageDetail_20' ) end [2025-03-03 12:13:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598389', 'tblTempVendorCDR_20' ) start [2025-03-03 12:13:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598389', 'tblTempVendorCDR_20' ) end [2025-03-03 12:13:22] Production.INFO: ProcessCDR(1,14598389,1,1,2) [2025-03-03 12:13:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598389,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:13:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598389,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:13:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598389,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:13:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598389,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:13:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598389', 'tblTempUsageDetail_20' ) start [2025-03-03 12:13:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598389', 'tblTempUsageDetail_20' ) end [2025-03-03 12:13:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:13:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:13:27] Production.INFO: ==17014== Releasing lock... [2025-03-03 12:13:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:13:27] Production.INFO: 73.75 MB #Memory Used# [2025-03-03 12:14:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:14:05 [end_date_ymd] => 2025-03-03 12:14:05 [RateCDR] => 1 ) [2025-03-03 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-03 09:14:05' and `end` < '2025-03-03 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-03 12:14:19] Production.INFO: count ==6092 [2025-03-03 12:14:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:14:05 - End Time 2025-03-03 12:14:05 [2025-03-03 12:14:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:14:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598394', 'tblTempUsageDetail_20' ) start [2025-03-03 12:14:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598394', 'tblTempUsageDetail_20' ) end [2025-03-03 12:14:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598394', 'tblTempVendorCDR_20' ) start [2025-03-03 12:14:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598394', 'tblTempVendorCDR_20' ) end [2025-03-03 12:14:22] Production.INFO: ProcessCDR(1,14598394,1,1,2) [2025-03-03 12:14:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598394,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:14:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598394,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:14:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598394,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:14:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598394,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:14:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598394', 'tblTempUsageDetail_20' ) start [2025-03-03 12:14:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598394', 'tblTempUsageDetail_20' ) end [2025-03-03 12:14:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:14:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:14:27] Production.INFO: ==17086== Releasing lock... [2025-03-03 12:14:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:14:27] Production.INFO: 73.5 MB #Memory Used# [2025-03-03 12:15:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:15:06 [end_date_ymd] => 2025-03-03 12:15:06 [RateCDR] => 1 ) [2025-03-03 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-03 09:15:06' and `end` < '2025-03-03 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-03 12:15:19] Production.INFO: count ==6079 [2025-03-03 12:15:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:15:06 - End Time 2025-03-03 12:15:06 [2025-03-03 12:15:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:15:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598399', 'tblTempUsageDetail_20' ) start [2025-03-03 12:15:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598399', 'tblTempUsageDetail_20' ) end [2025-03-03 12:15:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598399', 'tblTempVendorCDR_20' ) start [2025-03-03 12:15:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598399', 'tblTempVendorCDR_20' ) end [2025-03-03 12:15:23] Production.INFO: ProcessCDR(1,14598399,1,1,2) [2025-03-03 12:15:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598399,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:15:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598399,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:15:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598399,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:15:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598399,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:15:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598399', 'tblTempUsageDetail_20' ) start [2025-03-03 12:15:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598399', 'tblTempUsageDetail_20' ) end [2025-03-03 12:15:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:15:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:15:28] Production.INFO: ==17158== Releasing lock... [2025-03-03 12:15:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:15:28] Production.INFO: 73.5 MB #Memory Used# [2025-03-03 12:16:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:16:05 [end_date_ymd] => 2025-03-03 12:16:05 [RateCDR] => 1 ) [2025-03-03 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-03 09:16:05' and `end` < '2025-03-03 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-03 12:16:19] Production.INFO: count ==6109 [2025-03-03 12:16:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:16:05 - End Time 2025-03-03 12:16:05 [2025-03-03 12:16:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:16:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598404', 'tblTempUsageDetail_20' ) start [2025-03-03 12:16:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598404', 'tblTempUsageDetail_20' ) end [2025-03-03 12:16:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598404', 'tblTempVendorCDR_20' ) start [2025-03-03 12:16:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598404', 'tblTempVendorCDR_20' ) end [2025-03-03 12:16:22] Production.INFO: ProcessCDR(1,14598404,1,1,2) [2025-03-03 12:16:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598404,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:16:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598404,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:16:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598404,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:16:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598404,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:16:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598404', 'tblTempUsageDetail_20' ) start [2025-03-03 12:16:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598404', 'tblTempUsageDetail_20' ) end [2025-03-03 12:16:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:16:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:16:27] Production.INFO: ==17228== Releasing lock... [2025-03-03 12:16:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:16:27] Production.INFO: 73.75 MB #Memory Used# [2025-03-03 12:17:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:17:05 [end_date_ymd] => 2025-03-03 12:17:05 [RateCDR] => 1 ) [2025-03-03 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-03 09:17:05' and `end` < '2025-03-03 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-03 12:17:19] Production.INFO: count ==6149 [2025-03-03 12:17:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:17:05 - End Time 2025-03-03 12:17:05 [2025-03-03 12:17:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:17:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598409', 'tblTempUsageDetail_20' ) start [2025-03-03 12:17:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598409', 'tblTempUsageDetail_20' ) end [2025-03-03 12:17:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598409', 'tblTempVendorCDR_20' ) start [2025-03-03 12:17:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598409', 'tblTempVendorCDR_20' ) end [2025-03-03 12:17:22] Production.INFO: ProcessCDR(1,14598409,1,1,2) [2025-03-03 12:17:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598409,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:17:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598409,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:17:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598409,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:17:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598409,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:17:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598409', 'tblTempUsageDetail_20' ) start [2025-03-03 12:17:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598409', 'tblTempUsageDetail_20' ) end [2025-03-03 12:17:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:17:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:17:27] Production.INFO: ==17300== Releasing lock... [2025-03-03 12:17:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:17:27] Production.INFO: 74 MB #Memory Used# [2025-03-03 12:18:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:18:06 [end_date_ymd] => 2025-03-03 12:18:06 [RateCDR] => 1 ) [2025-03-03 12:18:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 09:18:06' and `end` < '2025-03-03 12:18:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 12:18:19] Production.INFO: count ==6166 [2025-03-03 12:18:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:18:06 - End Time 2025-03-03 12:18:06 [2025-03-03 12:18:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:18:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598414', 'tblTempUsageDetail_20' ) start [2025-03-03 12:18:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598414', 'tblTempUsageDetail_20' ) end [2025-03-03 12:18:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598414', 'tblTempVendorCDR_20' ) start [2025-03-03 12:18:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598414', 'tblTempVendorCDR_20' ) end [2025-03-03 12:18:22] Production.INFO: ProcessCDR(1,14598414,1,1,2) [2025-03-03 12:18:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598414,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:18:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598414,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:18:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598414,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:18:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598414,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:18:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598414', 'tblTempUsageDetail_20' ) start [2025-03-03 12:18:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598414', 'tblTempUsageDetail_20' ) end [2025-03-03 12:18:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:18:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:18:27] Production.INFO: ==17383== Releasing lock... [2025-03-03 12:18:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:18:27] Production.INFO: 74.25 MB #Memory Used# [2025-03-03 12:19:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:19:05 [end_date_ymd] => 2025-03-03 12:19:05 [RateCDR] => 1 ) [2025-03-03 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-03 09:19:05' and `end` < '2025-03-03 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-03 12:19:18] Production.INFO: count ==6169 [2025-03-03 12:19:21] Production.ERROR: pbx CDR StartTime 2025-03-03 09:19:05 - End Time 2025-03-03 12:19:05 [2025-03-03 12:19:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:19:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598419', 'tblTempUsageDetail_20' ) start [2025-03-03 12:19:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598419', 'tblTempUsageDetail_20' ) end [2025-03-03 12:19:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598419', 'tblTempVendorCDR_20' ) start [2025-03-03 12:19:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598419', 'tblTempVendorCDR_20' ) end [2025-03-03 12:19:21] Production.INFO: ProcessCDR(1,14598419,1,1,2) [2025-03-03 12:19:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598419,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:19:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598419,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:19:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598419,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:19:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598419,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:19:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598419', 'tblTempUsageDetail_20' ) start [2025-03-03 12:19:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598419', 'tblTempUsageDetail_20' ) end [2025-03-03 12:19:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:19:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:19:27] Production.INFO: ==17455== Releasing lock... [2025-03-03 12:19:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:19:27] Production.INFO: 74.25 MB #Memory Used# [2025-03-03 12:20:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:20:06 [end_date_ymd] => 2025-03-03 12:20:06 [RateCDR] => 1 ) [2025-03-03 12:20:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 09:20:06' and `end` < '2025-03-03 12:20:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 12:20:20] Production.INFO: count ==6187 [2025-03-03 12:20:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:20:06 - End Time 2025-03-03 12:20:06 [2025-03-03 12:20:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:20:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598425', 'tblTempUsageDetail_20' ) start [2025-03-03 12:20:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598425', 'tblTempUsageDetail_20' ) end [2025-03-03 12:20:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598425', 'tblTempVendorCDR_20' ) start [2025-03-03 12:20:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598425', 'tblTempVendorCDR_20' ) end [2025-03-03 12:20:23] Production.INFO: ProcessCDR(1,14598425,1,1,2) [2025-03-03 12:20:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598425,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:20:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598425,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:20:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598425,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:20:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598425,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:20:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598425', 'tblTempUsageDetail_20' ) start [2025-03-03 12:20:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598425', 'tblTempUsageDetail_20' ) end [2025-03-03 12:20:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:20:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:20:27] Production.INFO: ==17527== Releasing lock... [2025-03-03 12:20:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:20:27] Production.INFO: 74.25 MB #Memory Used# [2025-03-03 12:21:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:21:05 [end_date_ymd] => 2025-03-03 12:21:05 [RateCDR] => 1 ) [2025-03-03 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-03 09:21:05' and `end` < '2025-03-03 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-03 12:21:18] Production.INFO: count ==6213 [2025-03-03 12:21:21] Production.ERROR: pbx CDR StartTime 2025-03-03 09:21:05 - End Time 2025-03-03 12:21:05 [2025-03-03 12:21:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:21:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598430', 'tblTempUsageDetail_20' ) start [2025-03-03 12:21:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598430', 'tblTempUsageDetail_20' ) end [2025-03-03 12:21:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598430', 'tblTempVendorCDR_20' ) start [2025-03-03 12:21:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598430', 'tblTempVendorCDR_20' ) end [2025-03-03 12:21:21] Production.INFO: ProcessCDR(1,14598430,1,1,2) [2025-03-03 12:21:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598430,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:21:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598430,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:21:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598430,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:21:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598430,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:21:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598430', 'tblTempUsageDetail_20' ) start [2025-03-03 12:21:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598430', 'tblTempUsageDetail_20' ) end [2025-03-03 12:21:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:21:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:21:27] Production.INFO: ==17604== Releasing lock... [2025-03-03 12:21:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:21:27] Production.INFO: 74.5 MB #Memory Used# [2025-03-03 12:22:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:22:05 [end_date_ymd] => 2025-03-03 12:22:05 [RateCDR] => 1 ) [2025-03-03 12:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 09:22:05' and `end` < '2025-03-03 12:22:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 12:22:19] Production.INFO: count ==6225 [2025-03-03 12:22:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:22:05 - End Time 2025-03-03 12:22:05 [2025-03-03 12:22:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:22:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598435', 'tblTempUsageDetail_20' ) start [2025-03-03 12:22:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598435', 'tblTempUsageDetail_20' ) end [2025-03-03 12:22:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598435', 'tblTempVendorCDR_20' ) start [2025-03-03 12:22:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598435', 'tblTempVendorCDR_20' ) end [2025-03-03 12:22:22] Production.INFO: ProcessCDR(1,14598435,1,1,2) [2025-03-03 12:22:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598435,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:22:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598435,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:22:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598435,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:22:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598435,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:22:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598435', 'tblTempUsageDetail_20' ) start [2025-03-03 12:22:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598435', 'tblTempUsageDetail_20' ) end [2025-03-03 12:22:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:22:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:22:27] Production.INFO: ==17675== Releasing lock... [2025-03-03 12:22:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:22:27] Production.INFO: 74.5 MB #Memory Used# [2025-03-03 12:23:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:23:05 [end_date_ymd] => 2025-03-03 12:23:05 [RateCDR] => 1 ) [2025-03-03 12:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 09:23:05' and `end` < '2025-03-03 12:23:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 12:23:18] Production.INFO: count ==6227 [2025-03-03 12:23:21] Production.ERROR: pbx CDR StartTime 2025-03-03 09:23:05 - End Time 2025-03-03 12:23:05 [2025-03-03 12:23:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:23:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598440', 'tblTempUsageDetail_20' ) start [2025-03-03 12:23:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598440', 'tblTempUsageDetail_20' ) end [2025-03-03 12:23:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598440', 'tblTempVendorCDR_20' ) start [2025-03-03 12:23:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598440', 'tblTempVendorCDR_20' ) end [2025-03-03 12:23:21] Production.INFO: ProcessCDR(1,14598440,1,1,2) [2025-03-03 12:23:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598440,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:23:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598440,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:23:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598440,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:23:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598440,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:23:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598440', 'tblTempUsageDetail_20' ) start [2025-03-03 12:23:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598440', 'tblTempUsageDetail_20' ) end [2025-03-03 12:23:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:23:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:23:26] Production.INFO: ==17748== Releasing lock... [2025-03-03 12:23:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:23:26] Production.INFO: 74.75 MB #Memory Used# [2025-03-03 12:24:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:24:06 [end_date_ymd] => 2025-03-03 12:24:06 [RateCDR] => 1 ) [2025-03-03 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-03 09:24:06' and `end` < '2025-03-03 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-03 12:24:19] Production.INFO: count ==6224 [2025-03-03 12:24:24] Production.ERROR: pbx CDR StartTime 2025-03-03 09:24:06 - End Time 2025-03-03 12:24:06 [2025-03-03 12:24:24] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:24:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598445', 'tblTempUsageDetail_20' ) start [2025-03-03 12:24:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598445', 'tblTempUsageDetail_20' ) end [2025-03-03 12:24:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598445', 'tblTempVendorCDR_20' ) start [2025-03-03 12:24:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598445', 'tblTempVendorCDR_20' ) end [2025-03-03 12:24:24] Production.INFO: ProcessCDR(1,14598445,1,1,2) [2025-03-03 12:24:24] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598445,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:24:27] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598445,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:24:27] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598445,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:24:29] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598445,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:24:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598445', 'tblTempUsageDetail_20' ) start [2025-03-03 12:24:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598445', 'tblTempUsageDetail_20' ) end [2025-03-03 12:24:29] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:24:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:24:29] Production.INFO: ==17820== Releasing lock... [2025-03-03 12:24:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:24:29] Production.INFO: 74.5 MB #Memory Used# [2025-03-03 12:25:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:25:05 [end_date_ymd] => 2025-03-03 12:25:05 [RateCDR] => 1 ) [2025-03-03 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-03 09:25:05' and `end` < '2025-03-03 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-03 12:25:18] Production.INFO: count ==6229 [2025-03-03 12:25:21] Production.ERROR: pbx CDR StartTime 2025-03-03 09:25:05 - End Time 2025-03-03 12:25:05 [2025-03-03 12:25:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:25:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598450', 'tblTempUsageDetail_20' ) start [2025-03-03 12:25:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598450', 'tblTempUsageDetail_20' ) end [2025-03-03 12:25:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598450', 'tblTempVendorCDR_20' ) start [2025-03-03 12:25:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598450', 'tblTempVendorCDR_20' ) end [2025-03-03 12:25:21] Production.INFO: ProcessCDR(1,14598450,1,1,2) [2025-03-03 12:25:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598450,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:25:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598450,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:25:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598450,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:25:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598450,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:25:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598450', 'tblTempUsageDetail_20' ) start [2025-03-03 12:25:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598450', 'tblTempUsageDetail_20' ) end [2025-03-03 12:25:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:25:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:25:27] Production.INFO: ==17890== Releasing lock... [2025-03-03 12:25:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:25:27] Production.INFO: 74.75 MB #Memory Used# [2025-03-03 12:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:26:05 [end_date_ymd] => 2025-03-03 12:26:05 [RateCDR] => 1 ) [2025-03-03 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-03 09:26:05' and `end` < '2025-03-03 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-03 12:26:18] Production.INFO: count ==6248 [2025-03-03 12:26:21] Production.ERROR: pbx CDR StartTime 2025-03-03 09:26:05 - End Time 2025-03-03 12:26:05 [2025-03-03 12:26:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:26:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598455', 'tblTempUsageDetail_20' ) start [2025-03-03 12:26:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598455', 'tblTempUsageDetail_20' ) end [2025-03-03 12:26:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598455', 'tblTempVendorCDR_20' ) start [2025-03-03 12:26:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598455', 'tblTempVendorCDR_20' ) end [2025-03-03 12:26:22] Production.INFO: ProcessCDR(1,14598455,1,1,2) [2025-03-03 12:26:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598455,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:26:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598455,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:26:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598455,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:26:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598455,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:26:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598455', 'tblTempUsageDetail_20' ) start [2025-03-03 12:26:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598455', 'tblTempUsageDetail_20' ) end [2025-03-03 12:26:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:26:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:26:26] Production.INFO: ==17961== Releasing lock... [2025-03-03 12:26:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:26:26] Production.INFO: 74.75 MB #Memory Used# [2025-03-03 12:27:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:27:05 [end_date_ymd] => 2025-03-03 12:27:05 [RateCDR] => 1 ) [2025-03-03 12:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 09:27:05' and `end` < '2025-03-03 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-03 12:27:18] Production.INFO: count ==6251 [2025-03-03 12:27:21] Production.ERROR: pbx CDR StartTime 2025-03-03 09:27:05 - End Time 2025-03-03 12:27:05 [2025-03-03 12:27:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:27:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598460', 'tblTempUsageDetail_20' ) start [2025-03-03 12:27:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598460', 'tblTempUsageDetail_20' ) end [2025-03-03 12:27:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598460', 'tblTempVendorCDR_20' ) start [2025-03-03 12:27:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598460', 'tblTempVendorCDR_20' ) end [2025-03-03 12:27:21] Production.INFO: ProcessCDR(1,14598460,1,1,2) [2025-03-03 12:27:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598460,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:27:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598460,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:27:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598460,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:27:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598460,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:27:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598460', 'tblTempUsageDetail_20' ) start [2025-03-03 12:27:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598460', 'tblTempUsageDetail_20' ) end [2025-03-03 12:27:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:27:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:27:26] Production.INFO: ==18032== Releasing lock... [2025-03-03 12:27:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:27:26] Production.INFO: 74.75 MB #Memory Used# [2025-03-03 12:28:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:28:06 [end_date_ymd] => 2025-03-03 12:28:06 [RateCDR] => 1 ) [2025-03-03 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-03 09:28:06' and `end` < '2025-03-03 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-03 12:28:19] Production.INFO: count ==6281 [2025-03-03 12:28:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:28:06 - End Time 2025-03-03 12:28:06 [2025-03-03 12:28:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:28:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598465', 'tblTempUsageDetail_20' ) start [2025-03-03 12:28:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598465', 'tblTempUsageDetail_20' ) end [2025-03-03 12:28:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598465', 'tblTempVendorCDR_20' ) start [2025-03-03 12:28:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598465', 'tblTempVendorCDR_20' ) end [2025-03-03 12:28:22] Production.INFO: ProcessCDR(1,14598465,1,1,2) [2025-03-03 12:28:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598465,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:28:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598465,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:28:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598465,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:28:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598465,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:28:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598465', 'tblTempUsageDetail_20' ) start [2025-03-03 12:28:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598465', 'tblTempUsageDetail_20' ) end [2025-03-03 12:28:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:28:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:28:28] Production.INFO: ==18146== Releasing lock... [2025-03-03 12:28:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:28:28] Production.INFO: 75 MB #Memory Used# [2025-03-03 12:29:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:29:05 [end_date_ymd] => 2025-03-03 12:29:05 [RateCDR] => 1 ) [2025-03-03 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-03 09:29:05' and `end` < '2025-03-03 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-03 12:29:19] Production.INFO: count ==6296 [2025-03-03 12:29:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:29:05 - End Time 2025-03-03 12:29:05 [2025-03-03 12:29:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:29:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598470', 'tblTempUsageDetail_20' ) start [2025-03-03 12:29:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598470', 'tblTempUsageDetail_20' ) end [2025-03-03 12:29:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598470', 'tblTempVendorCDR_20' ) start [2025-03-03 12:29:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598470', 'tblTempVendorCDR_20' ) end [2025-03-03 12:29:22] Production.INFO: ProcessCDR(1,14598470,1,1,2) [2025-03-03 12:29:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598470,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:29:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598470,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:29:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598470,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:29:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598470,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:29:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598470', 'tblTempUsageDetail_20' ) start [2025-03-03 12:29:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598470', 'tblTempUsageDetail_20' ) end [2025-03-03 12:29:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:29:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:29:27] Production.INFO: ==18217== Releasing lock... [2025-03-03 12:29:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:29:27] Production.INFO: 75.25 MB #Memory Used# [2025-03-03 12:30:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:30:06 [end_date_ymd] => 2025-03-03 12:30:06 [RateCDR] => 1 ) [2025-03-03 12:30:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 09:30:06' and `end` < '2025-03-03 12:30:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 12:30:20] Production.INFO: count ==6310 [2025-03-03 12:30:23] Production.ERROR: pbx CDR StartTime 2025-03-03 09:30:06 - End Time 2025-03-03 12:30:06 [2025-03-03 12:30:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:30:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598475', 'tblTempUsageDetail_20' ) start [2025-03-03 12:30:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598475', 'tblTempUsageDetail_20' ) end [2025-03-03 12:30:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598475', 'tblTempVendorCDR_20' ) start [2025-03-03 12:30:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598475', 'tblTempVendorCDR_20' ) end [2025-03-03 12:30:23] Production.INFO: ProcessCDR(1,14598475,1,1,2) [2025-03-03 12:30:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598475,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:30:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598475,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:30:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598475,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:30:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598475,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:30:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598475', 'tblTempUsageDetail_20' ) start [2025-03-03 12:30:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598475', 'tblTempUsageDetail_20' ) end [2025-03-03 12:30:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:30:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:30:28] Production.INFO: ==18291== Releasing lock... [2025-03-03 12:30:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:30:28] Production.INFO: 75.25 MB #Memory Used# [2025-03-03 12:31:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:31:05 [end_date_ymd] => 2025-03-03 12:31:05 [RateCDR] => 1 ) [2025-03-03 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-03 09:31:05' and `end` < '2025-03-03 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-03 12:31:18] Production.INFO: count ==6395 [2025-03-03 12:31:21] Production.ERROR: pbx CDR StartTime 2025-03-03 09:31:05 - End Time 2025-03-03 12:31:05 [2025-03-03 12:31:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:31:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598481', 'tblTempUsageDetail_20' ) start [2025-03-03 12:31:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598481', 'tblTempUsageDetail_20' ) end [2025-03-03 12:31:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598481', 'tblTempVendorCDR_20' ) start [2025-03-03 12:31:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598481', 'tblTempVendorCDR_20' ) end [2025-03-03 12:31:21] Production.INFO: ProcessCDR(1,14598481,1,1,2) [2025-03-03 12:31:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598481,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:31:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598481,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:31:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598481,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:31:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598481,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:31:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598481', 'tblTempUsageDetail_20' ) start [2025-03-03 12:31:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598481', 'tblTempUsageDetail_20' ) end [2025-03-03 12:31:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:31:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:31:27] Production.INFO: ==18368== Releasing lock... [2025-03-03 12:31:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:31:27] Production.INFO: 76 MB #Memory Used# [2025-03-03 12:32:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:32:05 [end_date_ymd] => 2025-03-03 12:32:05 [RateCDR] => 1 ) [2025-03-03 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-03 09:32:05' and `end` < '2025-03-03 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-03 12:32:18] Production.INFO: count ==6394 [2025-03-03 12:32:21] Production.ERROR: pbx CDR StartTime 2025-03-03 09:32:05 - End Time 2025-03-03 12:32:05 [2025-03-03 12:32:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:32:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598486', 'tblTempUsageDetail_20' ) start [2025-03-03 12:32:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598486', 'tblTempUsageDetail_20' ) end [2025-03-03 12:32:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598486', 'tblTempVendorCDR_20' ) start [2025-03-03 12:32:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598486', 'tblTempVendorCDR_20' ) end [2025-03-03 12:32:21] Production.INFO: ProcessCDR(1,14598486,1,1,2) [2025-03-03 12:32:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598486,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:32:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598486,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:32:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598486,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:32:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598486,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:32:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598486', 'tblTempUsageDetail_20' ) start [2025-03-03 12:32:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598486', 'tblTempUsageDetail_20' ) end [2025-03-03 12:32:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:32:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:32:26] Production.INFO: ==18442== Releasing lock... [2025-03-03 12:32:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:32:26] Production.INFO: 76 MB #Memory Used# [2025-03-03 12:33:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:33:05 [end_date_ymd] => 2025-03-03 12:33:05 [RateCDR] => 1 ) [2025-03-03 12:33:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 09:33:05' and `end` < '2025-03-03 12:33:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 12:33:18] Production.INFO: count ==6397 [2025-03-03 12:33:21] Production.ERROR: pbx CDR StartTime 2025-03-03 09:33:05 - End Time 2025-03-03 12:33:05 [2025-03-03 12:33:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:33:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598491', 'tblTempUsageDetail_20' ) start [2025-03-03 12:33:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598491', 'tblTempUsageDetail_20' ) end [2025-03-03 12:33:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598491', 'tblTempVendorCDR_20' ) start [2025-03-03 12:33:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598491', 'tblTempVendorCDR_20' ) end [2025-03-03 12:33:22] Production.INFO: ProcessCDR(1,14598491,1,1,2) [2025-03-03 12:33:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598491,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:33:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598491,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:33:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598491,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:33:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598491,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:33:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598491', 'tblTempUsageDetail_20' ) start [2025-03-03 12:33:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598491', 'tblTempUsageDetail_20' ) end [2025-03-03 12:33:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:33:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:33:27] Production.INFO: ==18518== Releasing lock... [2025-03-03 12:33:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:33:27] Production.INFO: 76 MB #Memory Used# [2025-03-03 12:34:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:34:06 [end_date_ymd] => 2025-03-03 12:34:06 [RateCDR] => 1 ) [2025-03-03 12:34:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 09:34:06' and `end` < '2025-03-03 12:34:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 12:34:19] Production.INFO: count ==6373 [2025-03-03 12:34:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:34:06 - End Time 2025-03-03 12:34:06 [2025-03-03 12:34:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:34:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598496', 'tblTempUsageDetail_20' ) start [2025-03-03 12:34:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598496', 'tblTempUsageDetail_20' ) end [2025-03-03 12:34:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598496', 'tblTempVendorCDR_20' ) start [2025-03-03 12:34:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598496', 'tblTempVendorCDR_20' ) end [2025-03-03 12:34:22] Production.INFO: ProcessCDR(1,14598496,1,1,2) [2025-03-03 12:34:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598496,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:34:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598496,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:34:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598496,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:34:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598496,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:34:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598496', 'tblTempUsageDetail_20' ) start [2025-03-03 12:34:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598496', 'tblTempUsageDetail_20' ) end [2025-03-03 12:34:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:34:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:34:27] Production.INFO: ==18588== Releasing lock... [2025-03-03 12:34:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:34:27] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 12:35:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:35:05 [end_date_ymd] => 2025-03-03 12:35:05 [RateCDR] => 1 ) [2025-03-03 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-03 09:35:05' and `end` < '2025-03-03 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-03 12:35:18] Production.INFO: count ==6389 [2025-03-03 12:35:21] Production.ERROR: pbx CDR StartTime 2025-03-03 09:35:05 - End Time 2025-03-03 12:35:05 [2025-03-03 12:35:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:35:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598501', 'tblTempUsageDetail_20' ) start [2025-03-03 12:35:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598501', 'tblTempUsageDetail_20' ) end [2025-03-03 12:35:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598501', 'tblTempVendorCDR_20' ) start [2025-03-03 12:35:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598501', 'tblTempVendorCDR_20' ) end [2025-03-03 12:35:22] Production.INFO: ProcessCDR(1,14598501,1,1,2) [2025-03-03 12:35:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598501,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:35:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598501,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:35:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598501,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:35:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598501,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:35:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598501', 'tblTempUsageDetail_20' ) start [2025-03-03 12:35:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598501', 'tblTempUsageDetail_20' ) end [2025-03-03 12:35:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:35:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:35:27] Production.INFO: ==18667== Releasing lock... [2025-03-03 12:35:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:35:27] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 12:36:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:36:06 [end_date_ymd] => 2025-03-03 12:36:06 [RateCDR] => 1 ) [2025-03-03 12:36:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 09:36:06' and `end` < '2025-03-03 12:36:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 12:36:20] Production.INFO: count ==6390 [2025-03-03 12:36:23] Production.ERROR: pbx CDR StartTime 2025-03-03 09:36:06 - End Time 2025-03-03 12:36:06 [2025-03-03 12:36:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:36:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598506', 'tblTempUsageDetail_20' ) start [2025-03-03 12:36:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598506', 'tblTempUsageDetail_20' ) end [2025-03-03 12:36:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598506', 'tblTempVendorCDR_20' ) start [2025-03-03 12:36:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598506', 'tblTempVendorCDR_20' ) end [2025-03-03 12:36:23] Production.INFO: ProcessCDR(1,14598506,1,1,2) [2025-03-03 12:36:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598506,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:36:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598506,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:36:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598506,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:36:29] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598506,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:36:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598506', 'tblTempUsageDetail_20' ) start [2025-03-03 12:36:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598506', 'tblTempUsageDetail_20' ) end [2025-03-03 12:36:29] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:36:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:36:29] Production.INFO: ==18749== Releasing lock... [2025-03-03 12:36:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:36:29] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 12:37:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:37:06 [end_date_ymd] => 2025-03-03 12:37:06 [RateCDR] => 1 ) [2025-03-03 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-03 09:37:06' and `end` < '2025-03-03 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-03 12:37:19] Production.INFO: count ==6393 [2025-03-03 12:37:23] Production.ERROR: pbx CDR StartTime 2025-03-03 09:37:06 - End Time 2025-03-03 12:37:06 [2025-03-03 12:37:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:37:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598511', 'tblTempUsageDetail_20' ) start [2025-03-03 12:37:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598511', 'tblTempUsageDetail_20' ) end [2025-03-03 12:37:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598511', 'tblTempVendorCDR_20' ) start [2025-03-03 12:37:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598511', 'tblTempVendorCDR_20' ) end [2025-03-03 12:37:23] Production.INFO: ProcessCDR(1,14598511,1,1,2) [2025-03-03 12:37:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598511,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:37:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598511,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:37:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598511,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:37:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598511,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:37:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598511', 'tblTempUsageDetail_20' ) start [2025-03-03 12:37:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598511', 'tblTempUsageDetail_20' ) end [2025-03-03 12:37:29] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:37:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:37:29] Production.INFO: ==18827== Releasing lock... [2025-03-03 12:37:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:37:29] Production.INFO: 76 MB #Memory Used# [2025-03-03 12:38:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:38:06 [end_date_ymd] => 2025-03-03 12:38:06 [RateCDR] => 1 ) [2025-03-03 12:38:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 09:38:06' and `end` < '2025-03-03 12:38:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 12:38:20] Production.INFO: count ==6383 [2025-03-03 12:38:23] Production.ERROR: pbx CDR StartTime 2025-03-03 09:38:06 - End Time 2025-03-03 12:38:06 [2025-03-03 12:38:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:38:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598516', 'tblTempUsageDetail_20' ) start [2025-03-03 12:38:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598516', 'tblTempUsageDetail_20' ) end [2025-03-03 12:38:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598516', 'tblTempVendorCDR_20' ) start [2025-03-03 12:38:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598516', 'tblTempVendorCDR_20' ) end [2025-03-03 12:38:23] Production.INFO: ProcessCDR(1,14598516,1,1,2) [2025-03-03 12:38:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598516,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:38:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598516,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:38:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598516,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:38:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598516,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:38:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598516', 'tblTempUsageDetail_20' ) start [2025-03-03 12:38:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598516', 'tblTempUsageDetail_20' ) end [2025-03-03 12:38:29] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:38:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:38:29] Production.INFO: ==18909== Releasing lock... [2025-03-03 12:38:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:38:29] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 12:39:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:39:06 [end_date_ymd] => 2025-03-03 12:39:06 [RateCDR] => 1 ) [2025-03-03 12: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-03 09:39:06' and `end` < '2025-03-03 12: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-03 12:39:20] Production.INFO: count ==6385 [2025-03-03 12:39:24] Production.ERROR: pbx CDR StartTime 2025-03-03 09:39:06 - End Time 2025-03-03 12:39:06 [2025-03-03 12:39:24] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:39:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598521', 'tblTempUsageDetail_20' ) start [2025-03-03 12:39:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598521', 'tblTempUsageDetail_20' ) end [2025-03-03 12:39:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598521', 'tblTempVendorCDR_20' ) start [2025-03-03 12:39:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598521', 'tblTempVendorCDR_20' ) end [2025-03-03 12:39:24] Production.INFO: ProcessCDR(1,14598521,1,1,2) [2025-03-03 12:39:24] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598521,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:39:27] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598521,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:39:27] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598521,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:39:29] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598521,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:39:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598521', 'tblTempUsageDetail_20' ) start [2025-03-03 12:39:30] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598521', 'tblTempUsageDetail_20' ) end [2025-03-03 12:39:30] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:39:30] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:39:30] Production.INFO: ==18988== Releasing lock... [2025-03-03 12:39:30] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:39:30] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 12:40:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:40:06 [end_date_ymd] => 2025-03-03 12:40:06 [RateCDR] => 1 ) [2025-03-03 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-03 09:40:06' and `end` < '2025-03-03 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-03 12:40:20] Production.INFO: count ==6362 [2025-03-03 12:40:23] Production.ERROR: pbx CDR StartTime 2025-03-03 09:40:06 - End Time 2025-03-03 12:40:06 [2025-03-03 12:40:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:40:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598526', 'tblTempUsageDetail_20' ) start [2025-03-03 12:40:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598526', 'tblTempUsageDetail_20' ) end [2025-03-03 12:40:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598526', 'tblTempVendorCDR_20' ) start [2025-03-03 12:40:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598526', 'tblTempVendorCDR_20' ) end [2025-03-03 12:40:23] Production.INFO: ProcessCDR(1,14598526,1,1,2) [2025-03-03 12:40:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598526,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:40:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598526,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:40:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598526,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:40:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598526,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:40:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598526', 'tblTempUsageDetail_20' ) start [2025-03-03 12:40:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598526', 'tblTempUsageDetail_20' ) end [2025-03-03 12:40:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:40:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:40:28] Production.INFO: ==19076== Releasing lock... [2025-03-03 12:40:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:40:28] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 12:41:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:41:05 [end_date_ymd] => 2025-03-03 12:41:05 [RateCDR] => 1 ) [2025-03-03 12:41:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 09:41:05' and `end` < '2025-03-03 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-03 12:41:20] Production.INFO: count ==6376 [2025-03-03 12:41:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:41:05 - End Time 2025-03-03 12:41:05 [2025-03-03 12:41:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:41:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598532', 'tblTempUsageDetail_20' ) start [2025-03-03 12:41:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598532', 'tblTempUsageDetail_20' ) end [2025-03-03 12:41:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598532', 'tblTempVendorCDR_20' ) start [2025-03-03 12:41:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598532', 'tblTempVendorCDR_20' ) end [2025-03-03 12:41:23] Production.INFO: ProcessCDR(1,14598532,1,1,2) [2025-03-03 12:41:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598532,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:41:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598532,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:41:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598532,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:41:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598532,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:41:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598532', 'tblTempUsageDetail_20' ) start [2025-03-03 12:41:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598532', 'tblTempUsageDetail_20' ) end [2025-03-03 12:41:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:41:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:41:26] Production.INFO: ==19166== Releasing lock... [2025-03-03 12:41:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:41:26] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 12:42:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:42:05 [end_date_ymd] => 2025-03-03 12:42:05 [RateCDR] => 1 ) [2025-03-03 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-03 09:42:05' and `end` < '2025-03-03 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-03 12:42:19] Production.INFO: count ==6380 [2025-03-03 12:42:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:42:05 - End Time 2025-03-03 12:42:05 [2025-03-03 12:42:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:42:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598537', 'tblTempUsageDetail_20' ) start [2025-03-03 12:42:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598537', 'tblTempUsageDetail_20' ) end [2025-03-03 12:42:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598537', 'tblTempVendorCDR_20' ) start [2025-03-03 12:42:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598537', 'tblTempVendorCDR_20' ) end [2025-03-03 12:42:22] Production.INFO: ProcessCDR(1,14598537,1,1,2) [2025-03-03 12:42:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598537,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:42:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598537,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:42:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598537,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:42:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598537,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:42:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598537', 'tblTempUsageDetail_20' ) start [2025-03-03 12:42:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598537', 'tblTempUsageDetail_20' ) end [2025-03-03 12:42:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:42:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:42:27] Production.INFO: ==19242== Releasing lock... [2025-03-03 12:42:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:42:27] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 12:43:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:43:05 [end_date_ymd] => 2025-03-03 12:43:05 [RateCDR] => 1 ) [2025-03-03 12:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 09:43:05' and `end` < '2025-03-03 12:43:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 12:43:19] Production.INFO: count ==6395 [2025-03-03 12:43:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:43:05 - End Time 2025-03-03 12:43:05 [2025-03-03 12:43:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:43:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598542', 'tblTempUsageDetail_20' ) start [2025-03-03 12:43:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598542', 'tblTempUsageDetail_20' ) end [2025-03-03 12:43:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598542', 'tblTempVendorCDR_20' ) start [2025-03-03 12:43:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598542', 'tblTempVendorCDR_20' ) end [2025-03-03 12:43:22] Production.INFO: ProcessCDR(1,14598542,1,1,2) [2025-03-03 12:43:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598542,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:43:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598542,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:43:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598542,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:43:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598542,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:43:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598542', 'tblTempUsageDetail_20' ) start [2025-03-03 12:43:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598542', 'tblTempUsageDetail_20' ) end [2025-03-03 12:43:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:43:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:43:27] Production.INFO: ==19361== Releasing lock... [2025-03-03 12:43:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:43:27] Production.INFO: 76.25 MB #Memory Used# [2025-03-03 12:44:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:44:04 [end_date_ymd] => 2025-03-03 12:44:04 [RateCDR] => 1 ) [2025-03-03 12:44:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 09:44:04' and `end` < '2025-03-03 12:44:04' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 12:44:17] Production.INFO: count ==6395 [2025-03-03 12:44:20] Production.ERROR: pbx CDR StartTime 2025-03-03 09:44:04 - End Time 2025-03-03 12:44:04 [2025-03-03 12:44:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:44:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598547', 'tblTempUsageDetail_20' ) start [2025-03-03 12:44:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598547', 'tblTempUsageDetail_20' ) end [2025-03-03 12:44:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598547', 'tblTempVendorCDR_20' ) start [2025-03-03 12:44:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598547', 'tblTempVendorCDR_20' ) end [2025-03-03 12:44:21] Production.INFO: ProcessCDR(1,14598547,1,1,2) [2025-03-03 12:44:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598547,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:44:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598547,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:44:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598547,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:44:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598547,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:44:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598547', 'tblTempUsageDetail_20' ) start [2025-03-03 12:44:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598547', 'tblTempUsageDetail_20' ) end [2025-03-03 12:44:25] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:44:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:44:26] Production.INFO: ==19439== Releasing lock... [2025-03-03 12:44:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:44:26] Production.INFO: 76 MB #Memory Used# [2025-03-03 12:45:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:45:05 [end_date_ymd] => 2025-03-03 12:45:05 [RateCDR] => 1 ) [2025-03-03 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-03 09:45:05' and `end` < '2025-03-03 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-03 12:45:19] Production.INFO: count ==6386 [2025-03-03 12:45:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:45:05 - End Time 2025-03-03 12:45:05 [2025-03-03 12:45:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:45:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598552', 'tblTempUsageDetail_20' ) start [2025-03-03 12:45:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598552', 'tblTempUsageDetail_20' ) end [2025-03-03 12:45:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598552', 'tblTempVendorCDR_20' ) start [2025-03-03 12:45:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598552', 'tblTempVendorCDR_20' ) end [2025-03-03 12:45:22] Production.INFO: ProcessCDR(1,14598552,1,1,2) [2025-03-03 12:45:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598552,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:45:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598552,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:45:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598552,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:45:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598552,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:45:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598552', 'tblTempUsageDetail_20' ) start [2025-03-03 12:45:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598552', 'tblTempUsageDetail_20' ) end [2025-03-03 12:45:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:45:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:45:27] Production.INFO: ==19518== Releasing lock... [2025-03-03 12:45:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:45:27] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 12:46:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:46:06 [end_date_ymd] => 2025-03-03 12:46:06 [RateCDR] => 1 ) [2025-03-03 12:46:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 09:46:06' and `end` < '2025-03-03 12:46:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 12:46:19] Production.INFO: count ==6368 [2025-03-03 12:46:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:46:06 - End Time 2025-03-03 12:46:06 [2025-03-03 12:46:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:46:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598557', 'tblTempUsageDetail_20' ) start [2025-03-03 12:46:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598557', 'tblTempUsageDetail_20' ) end [2025-03-03 12:46:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598557', 'tblTempVendorCDR_20' ) start [2025-03-03 12:46:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598557', 'tblTempVendorCDR_20' ) end [2025-03-03 12:46:22] Production.INFO: ProcessCDR(1,14598557,1,1,2) [2025-03-03 12:46:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598557,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:46:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598557,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:46:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598557,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:46:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598557,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:46:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598557', 'tblTempUsageDetail_20' ) start [2025-03-03 12:46:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598557', 'tblTempUsageDetail_20' ) end [2025-03-03 12:46:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:46:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:46:27] Production.INFO: ==19601== Releasing lock... [2025-03-03 12:46:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:46:27] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 12:47:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:47:05 [end_date_ymd] => 2025-03-03 12:47:05 [RateCDR] => 1 ) [2025-03-03 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-03 09:47:05' and `end` < '2025-03-03 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-03 12:47:19] Production.INFO: count ==6344 [2025-03-03 12:47:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:47:05 - End Time 2025-03-03 12:47:05 [2025-03-03 12:47:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:47:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598562', 'tblTempUsageDetail_20' ) start [2025-03-03 12:47:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598562', 'tblTempUsageDetail_20' ) end [2025-03-03 12:47:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598562', 'tblTempVendorCDR_20' ) start [2025-03-03 12:47:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598562', 'tblTempVendorCDR_20' ) end [2025-03-03 12:47:22] Production.INFO: ProcessCDR(1,14598562,1,1,2) [2025-03-03 12:47:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598562,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:47:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598562,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:47:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598562,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:47:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598562,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:47:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598562', 'tblTempUsageDetail_20' ) start [2025-03-03 12:47:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598562', 'tblTempUsageDetail_20' ) end [2025-03-03 12:47:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:47:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:47:27] Production.INFO: ==19677== Releasing lock... [2025-03-03 12:47:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:47:27] Production.INFO: 75.5 MB #Memory Used# [2025-03-03 12:48:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:48:06 [end_date_ymd] => 2025-03-03 12:48:06 [RateCDR] => 1 ) [2025-03-03 12: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-03 09:48:06' and `end` < '2025-03-03 12: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-03 12:48:19] Production.INFO: count ==6341 [2025-03-03 12:48:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:48:06 - End Time 2025-03-03 12:48:06 [2025-03-03 12:48:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:48:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598567', 'tblTempUsageDetail_20' ) start [2025-03-03 12:48:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598567', 'tblTempUsageDetail_20' ) end [2025-03-03 12:48:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598567', 'tblTempVendorCDR_20' ) start [2025-03-03 12:48:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598567', 'tblTempVendorCDR_20' ) end [2025-03-03 12:48:22] Production.INFO: ProcessCDR(1,14598567,1,1,2) [2025-03-03 12:48:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598567,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:48:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598567,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:48:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598567,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:48:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598567,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:48:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598567', 'tblTempUsageDetail_20' ) start [2025-03-03 12:48:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598567', 'tblTempUsageDetail_20' ) end [2025-03-03 12:48:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:48:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:48:27] Production.INFO: ==19757== Releasing lock... [2025-03-03 12:48:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:48:27] Production.INFO: 75.5 MB #Memory Used# [2025-03-03 12:49:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:49:05 [end_date_ymd] => 2025-03-03 12:49:05 [RateCDR] => 1 ) [2025-03-03 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-03 09:49:05' and `end` < '2025-03-03 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-03 12:49:18] Production.INFO: count ==6345 [2025-03-03 12:49:21] Production.ERROR: pbx CDR StartTime 2025-03-03 09:49:05 - End Time 2025-03-03 12:49:05 [2025-03-03 12:49:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:49:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598572', 'tblTempUsageDetail_20' ) start [2025-03-03 12:49:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598572', 'tblTempUsageDetail_20' ) end [2025-03-03 12:49:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598572', 'tblTempVendorCDR_20' ) start [2025-03-03 12:49:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598572', 'tblTempVendorCDR_20' ) end [2025-03-03 12:49:21] Production.INFO: ProcessCDR(1,14598572,1,1,2) [2025-03-03 12:49:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598572,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:49:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598572,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:49:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598572,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:49:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598572,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:49:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598572', 'tblTempUsageDetail_20' ) start [2025-03-03 12:49:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598572', 'tblTempUsageDetail_20' ) end [2025-03-03 12:49:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:49:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:49:26] Production.INFO: ==19836== Releasing lock... [2025-03-03 12:49:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:49:26] Production.INFO: 75.5 MB #Memory Used# [2025-03-03 12:50:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:50:06 [end_date_ymd] => 2025-03-03 12:50:06 [RateCDR] => 1 ) [2025-03-03 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-03 09:50:06' and `end` < '2025-03-03 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-03 12:50:19] Production.INFO: count ==6366 [2025-03-03 12:50:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:50:06 - End Time 2025-03-03 12:50:06 [2025-03-03 12:50:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:50:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598578', 'tblTempUsageDetail_20' ) start [2025-03-03 12:50:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598578', 'tblTempUsageDetail_20' ) end [2025-03-03 12:50:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598578', 'tblTempVendorCDR_20' ) start [2025-03-03 12:50:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598578', 'tblTempVendorCDR_20' ) end [2025-03-03 12:50:23] Production.INFO: ProcessCDR(1,14598578,1,1,2) [2025-03-03 12:50:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598578,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:50:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598578,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:50:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598578,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:50:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598578,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:50:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598578', 'tblTempUsageDetail_20' ) start [2025-03-03 12:50:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598578', 'tblTempUsageDetail_20' ) end [2025-03-03 12:50:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:50:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:50:28] Production.INFO: ==19914== Releasing lock... [2025-03-03 12:50:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:50:28] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 12:51:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:51:05 [end_date_ymd] => 2025-03-03 12:51:05 [RateCDR] => 1 ) [2025-03-03 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-03 09:51:05' and `end` < '2025-03-03 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-03 12:51:19] Production.INFO: count ==6328 [2025-03-03 12:51:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:51:05 - End Time 2025-03-03 12:51:05 [2025-03-03 12:51:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:51:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598583', 'tblTempUsageDetail_20' ) start [2025-03-03 12:51:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598583', 'tblTempUsageDetail_20' ) end [2025-03-03 12:51:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598583', 'tblTempVendorCDR_20' ) start [2025-03-03 12:51:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598583', 'tblTempVendorCDR_20' ) end [2025-03-03 12:51:22] Production.INFO: ProcessCDR(1,14598583,1,1,2) [2025-03-03 12:51:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598583,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:51:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598583,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:51:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598583,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:51:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598583,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:51:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598583', 'tblTempUsageDetail_20' ) start [2025-03-03 12:51:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598583', 'tblTempUsageDetail_20' ) end [2025-03-03 12:51:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:51:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:51:26] Production.INFO: ==19994== Releasing lock... [2025-03-03 12:51:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:51:26] Production.INFO: 75.5 MB #Memory Used# [2025-03-03 12:52:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:52:06 [end_date_ymd] => 2025-03-03 12:52:06 [RateCDR] => 1 ) [2025-03-03 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-03 09:52:06' and `end` < '2025-03-03 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-03 12:52:19] Production.INFO: count ==6331 [2025-03-03 12:52:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:52:06 - End Time 2025-03-03 12:52:06 [2025-03-03 12:52:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:52:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598588', 'tblTempUsageDetail_20' ) start [2025-03-03 12:52:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598588', 'tblTempUsageDetail_20' ) end [2025-03-03 12:52:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598588', 'tblTempVendorCDR_20' ) start [2025-03-03 12:52:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598588', 'tblTempVendorCDR_20' ) end [2025-03-03 12:52:22] Production.INFO: ProcessCDR(1,14598588,1,1,2) [2025-03-03 12:52:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598588,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:52:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598588,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:52:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598588,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:52:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598588,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:52:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598588', 'tblTempUsageDetail_20' ) start [2025-03-03 12:52:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598588', 'tblTempUsageDetail_20' ) end [2025-03-03 12:52:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:52:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:52:27] Production.INFO: ==20073== Releasing lock... [2025-03-03 12:52:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:52:27] Production.INFO: 75.5 MB #Memory Used# [2025-03-03 12:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:53:05 [end_date_ymd] => 2025-03-03 12:53:05 [RateCDR] => 1 ) [2025-03-03 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-03 09:53:05' and `end` < '2025-03-03 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-03 12:53:18] Production.INFO: count ==6311 [2025-03-03 12:53:21] Production.ERROR: pbx CDR StartTime 2025-03-03 09:53:05 - End Time 2025-03-03 12:53:05 [2025-03-03 12:53:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:53:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598593', 'tblTempUsageDetail_20' ) start [2025-03-03 12:53:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598593', 'tblTempUsageDetail_20' ) end [2025-03-03 12:53:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598593', 'tblTempVendorCDR_20' ) start [2025-03-03 12:53:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598593', 'tblTempVendorCDR_20' ) end [2025-03-03 12:53:21] Production.INFO: ProcessCDR(1,14598593,1,1,2) [2025-03-03 12:53:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598593,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:53:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598593,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:53:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598593,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:53:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598593,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:53:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598593', 'tblTempUsageDetail_20' ) start [2025-03-03 12:53:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598593', 'tblTempUsageDetail_20' ) end [2025-03-03 12:53:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:53:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:53:26] Production.INFO: ==20154== Releasing lock... [2025-03-03 12:53:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:53:26] Production.INFO: 75.25 MB #Memory Used# [2025-03-03 12:54:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:54:05 [end_date_ymd] => 2025-03-03 12:54:05 [RateCDR] => 1 ) [2025-03-03 12:54:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 09:54:05' and `end` < '2025-03-03 12:54:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 12:54:18] Production.INFO: count ==6317 [2025-03-03 12:54:21] Production.ERROR: pbx CDR StartTime 2025-03-03 09:54:05 - End Time 2025-03-03 12:54:05 [2025-03-03 12:54:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:54:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598598', 'tblTempUsageDetail_20' ) start [2025-03-03 12:54:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598598', 'tblTempUsageDetail_20' ) end [2025-03-03 12:54:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598598', 'tblTempVendorCDR_20' ) start [2025-03-03 12:54:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598598', 'tblTempVendorCDR_20' ) end [2025-03-03 12:54:21] Production.INFO: ProcessCDR(1,14598598,1,1,2) [2025-03-03 12:54:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598598,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:54:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598598,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:54:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598598,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:54:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598598,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:54:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598598', 'tblTempUsageDetail_20' ) start [2025-03-03 12:54:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598598', 'tblTempUsageDetail_20' ) end [2025-03-03 12:54:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:54:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:54:27] Production.INFO: ==20231== Releasing lock... [2025-03-03 12:54:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:54:27] Production.INFO: 75.25 MB #Memory Used# [2025-03-03 12:55:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:55:05 [end_date_ymd] => 2025-03-03 12:55:05 [RateCDR] => 1 ) [2025-03-03 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-03 09:55:05' and `end` < '2025-03-03 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-03 12:55:19] Production.INFO: count ==6339 [2025-03-03 12:55:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:55:05 - End Time 2025-03-03 12:55:05 [2025-03-03 12:55:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:55:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598603', 'tblTempUsageDetail_20' ) start [2025-03-03 12:55:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598603', 'tblTempUsageDetail_20' ) end [2025-03-03 12:55:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598603', 'tblTempVendorCDR_20' ) start [2025-03-03 12:55:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598603', 'tblTempVendorCDR_20' ) end [2025-03-03 12:55:22] Production.INFO: ProcessCDR(1,14598603,1,1,2) [2025-03-03 12:55:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598603,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:55:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598603,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:55:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598603,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:55:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598603,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:55:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598603', 'tblTempUsageDetail_20' ) start [2025-03-03 12:55:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598603', 'tblTempUsageDetail_20' ) end [2025-03-03 12:55:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:55:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:55:27] Production.INFO: ==20308== Releasing lock... [2025-03-03 12:55:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:55:27] Production.INFO: 75.5 MB #Memory Used# [2025-03-03 12:56:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:56:06 [end_date_ymd] => 2025-03-03 12:56:06 [RateCDR] => 1 ) [2025-03-03 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-03 09:56:06' and `end` < '2025-03-03 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-03 12:56:19] Production.INFO: count ==6350 [2025-03-03 12:56:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:56:06 - End Time 2025-03-03 12:56:06 [2025-03-03 12:56:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:56:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598608', 'tblTempUsageDetail_20' ) start [2025-03-03 12:56:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598608', 'tblTempUsageDetail_20' ) end [2025-03-03 12:56:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598608', 'tblTempVendorCDR_20' ) start [2025-03-03 12:56:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598608', 'tblTempVendorCDR_20' ) end [2025-03-03 12:56:22] Production.INFO: ProcessCDR(1,14598608,1,1,2) [2025-03-03 12:56:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598608,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:56:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598608,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:56:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598608,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:56:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598608,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:56:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598608', 'tblTempUsageDetail_20' ) start [2025-03-03 12:56:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598608', 'tblTempUsageDetail_20' ) end [2025-03-03 12:56:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:56:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:56:28] Production.INFO: ==20389== Releasing lock... [2025-03-03 12:56:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:56:28] Production.INFO: 75.5 MB #Memory Used# [2025-03-03 12:57:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:57:05 [end_date_ymd] => 2025-03-03 12:57:05 [RateCDR] => 1 ) [2025-03-03 12:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 09:57:05' and `end` < '2025-03-03 12:57:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 12:57:18] Production.INFO: count ==6375 [2025-03-03 12:57:21] Production.ERROR: pbx CDR StartTime 2025-03-03 09:57:05 - End Time 2025-03-03 12:57:05 [2025-03-03 12:57:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:57:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598613', 'tblTempUsageDetail_20' ) start [2025-03-03 12:57:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598613', 'tblTempUsageDetail_20' ) end [2025-03-03 12:57:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598613', 'tblTempVendorCDR_20' ) start [2025-03-03 12:57:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598613', 'tblTempVendorCDR_20' ) end [2025-03-03 12:57:21] Production.INFO: ProcessCDR(1,14598613,1,1,2) [2025-03-03 12:57:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598613,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:57:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598613,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:57:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598613,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:57:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598613,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:57:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598613', 'tblTempUsageDetail_20' ) start [2025-03-03 12:57:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598613', 'tblTempUsageDetail_20' ) end [2025-03-03 12:57:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:57:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:57:27] Production.INFO: ==20467== Releasing lock... [2025-03-03 12:57:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:57:27] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 12:58:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:58:05 [end_date_ymd] => 2025-03-03 12:58:05 [RateCDR] => 1 ) [2025-03-03 12:58:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 09:58:05' and `end` < '2025-03-03 12:58:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 12:58:18] Production.INFO: count ==6408 [2025-03-03 12:58:21] Production.ERROR: pbx CDR StartTime 2025-03-03 09:58:05 - End Time 2025-03-03 12:58:05 [2025-03-03 12:58:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:58:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598618', 'tblTempUsageDetail_20' ) start [2025-03-03 12:58:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598618', 'tblTempUsageDetail_20' ) end [2025-03-03 12:58:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598618', 'tblTempVendorCDR_20' ) start [2025-03-03 12:58:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598618', 'tblTempVendorCDR_20' ) end [2025-03-03 12:58:22] Production.INFO: ProcessCDR(1,14598618,1,1,2) [2025-03-03 12:58:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598618,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:58:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598618,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:58:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598618,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:58:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598618,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:58:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598618', 'tblTempUsageDetail_20' ) start [2025-03-03 12:58:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598618', 'tblTempUsageDetail_20' ) end [2025-03-03 12:58:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:58:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:58:27] Production.INFO: ==20548== Releasing lock... [2025-03-03 12:58:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:58:27] Production.INFO: 76 MB #Memory Used# [2025-03-03 12:59:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 09:59:06 [end_date_ymd] => 2025-03-03 12:59:06 [RateCDR] => 1 ) [2025-03-03 12:59:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 09:59:06' and `end` < '2025-03-03 12:59:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 12:59:19] Production.INFO: count ==6378 [2025-03-03 12:59:22] Production.ERROR: pbx CDR StartTime 2025-03-03 09:59:06 - End Time 2025-03-03 12:59:06 [2025-03-03 12:59:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 12:59:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598623', 'tblTempUsageDetail_20' ) start [2025-03-03 12:59:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598623', 'tblTempUsageDetail_20' ) end [2025-03-03 12:59:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598623', 'tblTempVendorCDR_20' ) start [2025-03-03 12:59:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598623', 'tblTempVendorCDR_20' ) end [2025-03-03 12:59:22] Production.INFO: ProcessCDR(1,14598623,1,1,2) [2025-03-03 12:59:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598623,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:59:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598623,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 12:59:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598623,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:59:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598623,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 12:59:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598623', 'tblTempUsageDetail_20' ) start [2025-03-03 12:59:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598623', 'tblTempUsageDetail_20' ) end [2025-03-03 12:59:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 12:59:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 12:59:27] Production.INFO: ==20671== Releasing lock... [2025-03-03 12:59:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 12:59:27] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 13:00:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:00:07 [end_date_ymd] => 2025-03-03 13:00:07 [RateCDR] => 1 ) [2025-03-03 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-03 10:00:07' and `end` < '2025-03-03 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-03 13:00:20] Production.INFO: count ==6377 [2025-03-03 13:00:23] Production.ERROR: pbx CDR StartTime 2025-03-03 10:00:07 - End Time 2025-03-03 13:00:07 [2025-03-03 13:00:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:00:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598629', 'tblTempUsageDetail_20' ) start [2025-03-03 13:00:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598629', 'tblTempUsageDetail_20' ) end [2025-03-03 13:00:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598629', 'tblTempVendorCDR_20' ) start [2025-03-03 13:00:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598629', 'tblTempVendorCDR_20' ) end [2025-03-03 13:00:23] Production.INFO: ProcessCDR(1,14598629,1,1,2) [2025-03-03 13:00:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598629,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:00:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598629,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:00:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598629,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:00:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598629,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:00:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598629', 'tblTempUsageDetail_20' ) start [2025-03-03 13:00:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598629', 'tblTempUsageDetail_20' ) end [2025-03-03 13:00:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:00:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:00:28] Production.INFO: ==20751== Releasing lock... [2025-03-03 13:00:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:00:28] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 13:01:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:01:05 [end_date_ymd] => 2025-03-03 13:01:05 [RateCDR] => 1 ) [2025-03-03 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-03 10:01:05' and `end` < '2025-03-03 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-03 13:01:19] Production.INFO: count ==6405 [2025-03-03 13:01:21] Production.ERROR: pbx CDR StartTime 2025-03-03 10:01:05 - End Time 2025-03-03 13:01:05 [2025-03-03 13:01:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:01:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598634', 'tblTempUsageDetail_20' ) start [2025-03-03 13:01:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598634', 'tblTempUsageDetail_20' ) end [2025-03-03 13:01:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598634', 'tblTempVendorCDR_20' ) start [2025-03-03 13:01:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598634', 'tblTempVendorCDR_20' ) end [2025-03-03 13:01:22] Production.INFO: ProcessCDR(1,14598634,1,1,2) [2025-03-03 13:01:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598634,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:01:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598634,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:01:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598634,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:01:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598634,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:01:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598634', 'tblTempUsageDetail_20' ) start [2025-03-03 13:01:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598634', 'tblTempUsageDetail_20' ) end [2025-03-03 13:01:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:01:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:01:27] Production.INFO: ==20845== Releasing lock... [2025-03-03 13:01:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:01:27] Production.INFO: 76 MB #Memory Used# [2025-03-03 13:02:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:02:05 [end_date_ymd] => 2025-03-03 13:02:05 [RateCDR] => 1 ) [2025-03-03 13:02:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 10:02:05' and `end` < '2025-03-03 13:02:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 13:02:18] Production.INFO: count ==6413 [2025-03-03 13:02:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:02:05 - End Time 2025-03-03 13:02:05 [2025-03-03 13:02:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:02:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598639', 'tblTempUsageDetail_20' ) start [2025-03-03 13:02:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598639', 'tblTempUsageDetail_20' ) end [2025-03-03 13:02:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598639', 'tblTempVendorCDR_20' ) start [2025-03-03 13:02:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598639', 'tblTempVendorCDR_20' ) end [2025-03-03 13:02:22] Production.INFO: ProcessCDR(1,14598639,1,1,2) [2025-03-03 13:02:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598639,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:02:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598639,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:02:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598639,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:02:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598639,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:02:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598639', 'tblTempUsageDetail_20' ) start [2025-03-03 13:02:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598639', 'tblTempUsageDetail_20' ) end [2025-03-03 13:02:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:02:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:02:27] Production.INFO: ==20925== Releasing lock... [2025-03-03 13:02:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:02:27] Production.INFO: 76 MB #Memory Used# [2025-03-03 13:03:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:03:05 [end_date_ymd] => 2025-03-03 13:03:05 [RateCDR] => 1 ) [2025-03-03 13: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-03 10:03:05' and `end` < '2025-03-03 13: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-03 13:03:18] Production.INFO: count ==6388 [2025-03-03 13:03:21] Production.ERROR: pbx CDR StartTime 2025-03-03 10:03:05 - End Time 2025-03-03 13:03:05 [2025-03-03 13:03:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:03:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598644', 'tblTempUsageDetail_20' ) start [2025-03-03 13:03:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598644', 'tblTempUsageDetail_20' ) end [2025-03-03 13:03:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598644', 'tblTempVendorCDR_20' ) start [2025-03-03 13:03:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598644', 'tblTempVendorCDR_20' ) end [2025-03-03 13:03:22] Production.INFO: ProcessCDR(1,14598644,1,1,2) [2025-03-03 13:03:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598644,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:03:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598644,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:03:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598644,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:03:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598644,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:03:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598644', 'tblTempUsageDetail_20' ) start [2025-03-03 13:03:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598644', 'tblTempUsageDetail_20' ) end [2025-03-03 13:03:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:03:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:03:26] Production.INFO: ==21006== Releasing lock... [2025-03-03 13:03:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:03:26] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 13:04:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:04:06 [end_date_ymd] => 2025-03-03 13:04:06 [RateCDR] => 1 ) [2025-03-03 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-03 10:04:06' and `end` < '2025-03-03 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-03 13:04:19] Production.INFO: count ==6371 [2025-03-03 13:04:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:04:06 - End Time 2025-03-03 13:04:06 [2025-03-03 13:04:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:04:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598649', 'tblTempUsageDetail_20' ) start [2025-03-03 13:04:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598649', 'tblTempUsageDetail_20' ) end [2025-03-03 13:04:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598649', 'tblTempVendorCDR_20' ) start [2025-03-03 13:04:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598649', 'tblTempVendorCDR_20' ) end [2025-03-03 13:04:22] Production.INFO: ProcessCDR(1,14598649,1,1,2) [2025-03-03 13:04:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598649,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:04:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598649,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:04:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598649,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:04:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598649,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:04:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598649', 'tblTempUsageDetail_20' ) start [2025-03-03 13:04:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598649', 'tblTempUsageDetail_20' ) end [2025-03-03 13:04:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:04:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:04:27] Production.INFO: ==21087== Releasing lock... [2025-03-03 13:04:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:04:27] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 13:05:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:05:05 [end_date_ymd] => 2025-03-03 13:05:05 [RateCDR] => 1 ) [2025-03-03 13:05:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 10:05:05' and `end` < '2025-03-03 13:05:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 13:05:19] Production.INFO: count ==6348 [2025-03-03 13:05:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:05:05 - End Time 2025-03-03 13:05:05 [2025-03-03 13:05:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:05:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598654', 'tblTempUsageDetail_20' ) start [2025-03-03 13:05:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598654', 'tblTempUsageDetail_20' ) end [2025-03-03 13:05:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598654', 'tblTempVendorCDR_20' ) start [2025-03-03 13:05:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598654', 'tblTempVendorCDR_20' ) end [2025-03-03 13:05:22] Production.INFO: ProcessCDR(1,14598654,1,1,2) [2025-03-03 13:05:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598654,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:05:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598654,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:05:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598654,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:05:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598654,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:05:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598654', 'tblTempUsageDetail_20' ) start [2025-03-03 13:05:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598654', 'tblTempUsageDetail_20' ) end [2025-03-03 13:05:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:05:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:05:27] Production.INFO: ==21162== Releasing lock... [2025-03-03 13:05:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:05:27] Production.INFO: 75.5 MB #Memory Used# [2025-03-03 13:06:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:06:06 [end_date_ymd] => 2025-03-03 13:06:06 [RateCDR] => 1 ) [2025-03-03 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-03 10:06:06' and `end` < '2025-03-03 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-03 13:06:20] Production.INFO: count ==6368 [2025-03-03 13:06:23] Production.ERROR: pbx CDR StartTime 2025-03-03 10:06:06 - End Time 2025-03-03 13:06:06 [2025-03-03 13:06:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:06:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598659', 'tblTempUsageDetail_20' ) start [2025-03-03 13:06:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598659', 'tblTempUsageDetail_20' ) end [2025-03-03 13:06:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598659', 'tblTempVendorCDR_20' ) start [2025-03-03 13:06:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598659', 'tblTempVendorCDR_20' ) end [2025-03-03 13:06:23] Production.INFO: ProcessCDR(1,14598659,1,1,2) [2025-03-03 13:06:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598659,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:06:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598659,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:06:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598659,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:06:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598659,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:06:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598659', 'tblTempUsageDetail_20' ) start [2025-03-03 13:06:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598659', 'tblTempUsageDetail_20' ) end [2025-03-03 13:06:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:06:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:06:28] Production.INFO: ==21244== Releasing lock... [2025-03-03 13:06:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:06:28] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 13:07:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:07:05 [end_date_ymd] => 2025-03-03 13:07:05 [RateCDR] => 1 ) [2025-03-03 13:07:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 10:07:05' and `end` < '2025-03-03 13:07:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 13:07:18] Production.INFO: count ==6370 [2025-03-03 13:07:21] Production.ERROR: pbx CDR StartTime 2025-03-03 10:07:05 - End Time 2025-03-03 13:07:05 [2025-03-03 13:07:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:07:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598664', 'tblTempUsageDetail_20' ) start [2025-03-03 13:07:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598664', 'tblTempUsageDetail_20' ) end [2025-03-03 13:07:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598664', 'tblTempVendorCDR_20' ) start [2025-03-03 13:07:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598664', 'tblTempVendorCDR_20' ) end [2025-03-03 13:07:22] Production.INFO: ProcessCDR(1,14598664,1,1,2) [2025-03-03 13:07:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598664,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:07:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598664,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:07:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598664,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:07:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598664,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:07:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598664', 'tblTempUsageDetail_20' ) start [2025-03-03 13:07:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598664', 'tblTempUsageDetail_20' ) end [2025-03-03 13:07:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:07:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:07:27] Production.INFO: ==21322== Releasing lock... [2025-03-03 13:07:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:07:27] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 13:08:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:08:06 [end_date_ymd] => 2025-03-03 13:08:06 [RateCDR] => 1 ) [2025-03-03 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-03 10:08:06' and `end` < '2025-03-03 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-03 13:08:19] Production.INFO: count ==6378 [2025-03-03 13:08:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:08:06 - End Time 2025-03-03 13:08:06 [2025-03-03 13:08:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:08:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598669', 'tblTempUsageDetail_20' ) start [2025-03-03 13:08:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598669', 'tblTempUsageDetail_20' ) end [2025-03-03 13:08:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598669', 'tblTempVendorCDR_20' ) start [2025-03-03 13:08:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598669', 'tblTempVendorCDR_20' ) end [2025-03-03 13:08:22] Production.INFO: ProcessCDR(1,14598669,1,1,2) [2025-03-03 13:08:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598669,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:08:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598669,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:08:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598669,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:08:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598669,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:08:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598669', 'tblTempUsageDetail_20' ) start [2025-03-03 13:08:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598669', 'tblTempUsageDetail_20' ) end [2025-03-03 13:08:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:08:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:08:28] Production.INFO: ==21399== Releasing lock... [2025-03-03 13:08:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:08:28] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 13:09:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:09:05 [end_date_ymd] => 2025-03-03 13:09:05 [RateCDR] => 1 ) [2025-03-03 13:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 10:09:05' and `end` < '2025-03-03 13:09:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 13:09:18] Production.INFO: count ==6375 [2025-03-03 13:09:21] Production.ERROR: pbx CDR StartTime 2025-03-03 10:09:05 - End Time 2025-03-03 13:09:05 [2025-03-03 13:09:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:09:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598674', 'tblTempUsageDetail_20' ) start [2025-03-03 13:09:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598674', 'tblTempUsageDetail_20' ) end [2025-03-03 13:09:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598674', 'tblTempVendorCDR_20' ) start [2025-03-03 13:09:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598674', 'tblTempVendorCDR_20' ) end [2025-03-03 13:09:21] Production.INFO: ProcessCDR(1,14598674,1,1,2) [2025-03-03 13:09:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598674,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:09:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598674,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:09:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598674,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:09:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598674,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:09:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598674', 'tblTempUsageDetail_20' ) start [2025-03-03 13:09:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598674', 'tblTempUsageDetail_20' ) end [2025-03-03 13:09:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:09:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:09:26] Production.INFO: ==21476== Releasing lock... [2025-03-03 13:09:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:09:26] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 13:10:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:10:06 [end_date_ymd] => 2025-03-03 13:10:06 [RateCDR] => 1 ) [2025-03-03 13:10:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 10:10:06' and `end` < '2025-03-03 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-03 13:10:20] Production.INFO: count ==6387 [2025-03-03 13:10:23] Production.ERROR: pbx CDR StartTime 2025-03-03 10:10:06 - End Time 2025-03-03 13:10:06 [2025-03-03 13:10:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:10:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598679', 'tblTempUsageDetail_20' ) start [2025-03-03 13:10:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598679', 'tblTempUsageDetail_20' ) end [2025-03-03 13:10:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598679', 'tblTempVendorCDR_20' ) start [2025-03-03 13:10:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598679', 'tblTempVendorCDR_20' ) end [2025-03-03 13:10:23] Production.INFO: ProcessCDR(1,14598679,1,1,2) [2025-03-03 13:10:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598679,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:10:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598679,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:10:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598679,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:10:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598679,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:10:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598679', 'tblTempUsageDetail_20' ) start [2025-03-03 13:10:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598679', 'tblTempUsageDetail_20' ) end [2025-03-03 13:10:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:10:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:10:28] Production.INFO: ==21555== Releasing lock... [2025-03-03 13:10:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:10:28] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 13:11:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:11:04 [end_date_ymd] => 2025-03-03 13:11:04 [RateCDR] => 1 ) [2025-03-03 13: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-03 10:11:04' and `end` < '2025-03-03 13: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-03 13:11:18] Production.INFO: count ==6365 [2025-03-03 13:11:21] Production.ERROR: pbx CDR StartTime 2025-03-03 10:11:04 - End Time 2025-03-03 13:11:04 [2025-03-03 13:11:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:11:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598685', 'tblTempUsageDetail_20' ) start [2025-03-03 13:11:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598685', 'tblTempUsageDetail_20' ) end [2025-03-03 13:11:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598685', 'tblTempVendorCDR_20' ) start [2025-03-03 13:11:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598685', 'tblTempVendorCDR_20' ) end [2025-03-03 13:11:21] Production.INFO: ProcessCDR(1,14598685,1,1,2) [2025-03-03 13:11:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598685,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:11:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598685,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:11:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598685,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:11:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598685,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:11:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598685', 'tblTempUsageDetail_20' ) start [2025-03-03 13:11:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598685', 'tblTempUsageDetail_20' ) end [2025-03-03 13:11:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:11:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:11:26] Production.INFO: ==21632== Releasing lock... [2025-03-03 13:11:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:11:26] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 13:12:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:12:05 [end_date_ymd] => 2025-03-03 13:12:05 [RateCDR] => 1 ) [2025-03-03 13:12:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 10:12:05' and `end` < '2025-03-03 13:12:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 13:12:18] Production.INFO: count ==6368 [2025-03-03 13:12:21] Production.ERROR: pbx CDR StartTime 2025-03-03 10:12:05 - End Time 2025-03-03 13:12:05 [2025-03-03 13:12:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:12:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598690', 'tblTempUsageDetail_20' ) start [2025-03-03 13:12:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598690', 'tblTempUsageDetail_20' ) end [2025-03-03 13:12:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598690', 'tblTempVendorCDR_20' ) start [2025-03-03 13:12:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598690', 'tblTempVendorCDR_20' ) end [2025-03-03 13:12:22] Production.INFO: ProcessCDR(1,14598690,1,1,2) [2025-03-03 13:12:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598690,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:12:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598690,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:12:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598690,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:12:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598690,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:12:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598690', 'tblTempUsageDetail_20' ) start [2025-03-03 13:12:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598690', 'tblTempUsageDetail_20' ) end [2025-03-03 13:12:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:12:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:12:26] Production.INFO: ==21707== Releasing lock... [2025-03-03 13:12:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:12:26] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 13:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:13:05 [end_date_ymd] => 2025-03-03 13:13:05 [RateCDR] => 1 ) [2025-03-03 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-03 10:13:05' and `end` < '2025-03-03 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-03 13:13:18] Production.INFO: count ==6350 [2025-03-03 13:13:21] Production.ERROR: pbx CDR StartTime 2025-03-03 10:13:05 - End Time 2025-03-03 13:13:05 [2025-03-03 13:13:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:13:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598695', 'tblTempUsageDetail_20' ) start [2025-03-03 13:13:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598695', 'tblTempUsageDetail_20' ) end [2025-03-03 13:13:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598695', 'tblTempVendorCDR_20' ) start [2025-03-03 13:13:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598695', 'tblTempVendorCDR_20' ) end [2025-03-03 13:13:21] Production.INFO: ProcessCDR(1,14598695,1,1,2) [2025-03-03 13:13:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598695,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:13:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598695,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:13:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598695,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:13:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598695,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:13:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598695', 'tblTempUsageDetail_20' ) start [2025-03-03 13:13:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598695', 'tblTempUsageDetail_20' ) end [2025-03-03 13:13:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:13:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:13:26] Production.INFO: ==21781== Releasing lock... [2025-03-03 13:13:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:13:26] Production.INFO: 75.5 MB #Memory Used# [2025-03-03 13:14:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:14:05 [end_date_ymd] => 2025-03-03 13:14:05 [RateCDR] => 1 ) [2025-03-03 13:14:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 10:14:05' and `end` < '2025-03-03 13:14:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 13:14:18] Production.INFO: count ==6353 [2025-03-03 13:14:21] Production.ERROR: pbx CDR StartTime 2025-03-03 10:14:05 - End Time 2025-03-03 13:14:05 [2025-03-03 13:14:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:14:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598700', 'tblTempUsageDetail_20' ) start [2025-03-03 13:14:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598700', 'tblTempUsageDetail_20' ) end [2025-03-03 13:14:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598700', 'tblTempVendorCDR_20' ) start [2025-03-03 13:14:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598700', 'tblTempVendorCDR_20' ) end [2025-03-03 13:14:21] Production.INFO: ProcessCDR(1,14598700,1,1,2) [2025-03-03 13:14:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598700,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:14:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598700,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:14:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598700,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:14:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598700,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:14:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598700', 'tblTempUsageDetail_20' ) start [2025-03-03 13:14:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598700', 'tblTempUsageDetail_20' ) end [2025-03-03 13:14:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:14:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:14:26] Production.INFO: ==21895== Releasing lock... [2025-03-03 13:14:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:14:26] Production.INFO: 75.5 MB #Memory Used# [2025-03-03 13:15:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:15:05 [end_date_ymd] => 2025-03-03 13:15:05 [RateCDR] => 1 ) [2025-03-03 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-03 10:15:05' and `end` < '2025-03-03 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-03 13:15:18] Production.INFO: count ==6350 [2025-03-03 13:15:21] Production.ERROR: pbx CDR StartTime 2025-03-03 10:15:05 - End Time 2025-03-03 13:15:05 [2025-03-03 13:15:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:15:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598705', 'tblTempUsageDetail_20' ) start [2025-03-03 13:15:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598705', 'tblTempUsageDetail_20' ) end [2025-03-03 13:15:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598705', 'tblTempVendorCDR_20' ) start [2025-03-03 13:15:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598705', 'tblTempVendorCDR_20' ) end [2025-03-03 13:15:22] Production.INFO: ProcessCDR(1,14598705,1,1,2) [2025-03-03 13:15:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598705,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:15:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598705,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:15:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598705,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:15:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598705,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:15:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598705', 'tblTempUsageDetail_20' ) start [2025-03-03 13:15:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598705', 'tblTempUsageDetail_20' ) end [2025-03-03 13:15:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:15:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:15:26] Production.INFO: ==21967== Releasing lock... [2025-03-03 13:15:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:15:26] Production.INFO: 75.5 MB #Memory Used# [2025-03-03 13:16:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:16:05 [end_date_ymd] => 2025-03-03 13:16:05 [RateCDR] => 1 ) [2025-03-03 13:16:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 10:16:05' and `end` < '2025-03-03 13:16:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 13:16:18] Production.INFO: count ==6365 [2025-03-03 13:16:21] Production.ERROR: pbx CDR StartTime 2025-03-03 10:16:05 - End Time 2025-03-03 13:16:05 [2025-03-03 13:16:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:16:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598710', 'tblTempUsageDetail_20' ) start [2025-03-03 13:16:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598710', 'tblTempUsageDetail_20' ) end [2025-03-03 13:16:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598710', 'tblTempVendorCDR_20' ) start [2025-03-03 13:16:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598710', 'tblTempVendorCDR_20' ) end [2025-03-03 13:16:22] Production.INFO: ProcessCDR(1,14598710,1,1,2) [2025-03-03 13:16:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598710,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:16:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598710,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:16:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598710,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:16:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598710,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:16:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598710', 'tblTempUsageDetail_20' ) start [2025-03-03 13:16:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598710', 'tblTempUsageDetail_20' ) end [2025-03-03 13:16:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:16:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:16:26] Production.INFO: ==22039== Releasing lock... [2025-03-03 13:16:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:16:26] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 13:17:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:17:06 [end_date_ymd] => 2025-03-03 13:17:06 [RateCDR] => 1 ) [2025-03-03 13:17:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 10:17:06' and `end` < '2025-03-03 13:17:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 13:17:19] Production.INFO: count ==6364 [2025-03-03 13:17:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:17:06 - End Time 2025-03-03 13:17:06 [2025-03-03 13:17:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:17:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598715', 'tblTempUsageDetail_20' ) start [2025-03-03 13:17:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598715', 'tblTempUsageDetail_20' ) end [2025-03-03 13:17:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598715', 'tblTempVendorCDR_20' ) start [2025-03-03 13:17:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598715', 'tblTempVendorCDR_20' ) end [2025-03-03 13:17:22] Production.INFO: ProcessCDR(1,14598715,1,1,2) [2025-03-03 13:17:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598715,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:17:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598715,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:17:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598715,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:17:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598715,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:17:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598715', 'tblTempUsageDetail_20' ) start [2025-03-03 13:17:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598715', 'tblTempUsageDetail_20' ) end [2025-03-03 13:17:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:17:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:17:28] Production.INFO: ==22116== Releasing lock... [2025-03-03 13:17:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:17:28] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 13:18:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:18:06 [end_date_ymd] => 2025-03-03 13:18:06 [RateCDR] => 1 ) [2025-03-03 13: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-03 10:18:06' and `end` < '2025-03-03 13: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-03 13:18:19] Production.INFO: count ==6364 [2025-03-03 13:18:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:18:06 - End Time 2025-03-03 13:18:06 [2025-03-03 13:18:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:18:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598720', 'tblTempUsageDetail_20' ) start [2025-03-03 13:18:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598720', 'tblTempUsageDetail_20' ) end [2025-03-03 13:18:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598720', 'tblTempVendorCDR_20' ) start [2025-03-03 13:18:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598720', 'tblTempVendorCDR_20' ) end [2025-03-03 13:18:22] Production.INFO: ProcessCDR(1,14598720,1,1,2) [2025-03-03 13:18:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598720,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:18:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598720,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:18:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598720,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:18:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598720,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:18:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598720', 'tblTempUsageDetail_20' ) start [2025-03-03 13:18:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598720', 'tblTempUsageDetail_20' ) end [2025-03-03 13:18:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:18:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:18:27] Production.INFO: ==22191== Releasing lock... [2025-03-03 13:18:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:18:27] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 13:19:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:19:05 [end_date_ymd] => 2025-03-03 13:19:05 [RateCDR] => 1 ) [2025-03-03 13: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-03 10:19:05' and `end` < '2025-03-03 13: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-03 13:19:19] Production.INFO: count ==6383 [2025-03-03 13:19:21] Production.ERROR: pbx CDR StartTime 2025-03-03 10:19:05 - End Time 2025-03-03 13:19:05 [2025-03-03 13:19:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:19:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598725', 'tblTempUsageDetail_20' ) start [2025-03-03 13:19:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598725', 'tblTempUsageDetail_20' ) end [2025-03-03 13:19:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598725', 'tblTempVendorCDR_20' ) start [2025-03-03 13:19:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598725', 'tblTempVendorCDR_20' ) end [2025-03-03 13:19:22] Production.INFO: ProcessCDR(1,14598725,1,1,2) [2025-03-03 13:19:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598725,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:19:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598725,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:19:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598725,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:19:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598725,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:19:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598725', 'tblTempUsageDetail_20' ) start [2025-03-03 13:19:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598725', 'tblTempUsageDetail_20' ) end [2025-03-03 13:19:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:19:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:19:27] Production.INFO: ==22266== Releasing lock... [2025-03-03 13:19:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:19:27] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 13:20:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:20:06 [end_date_ymd] => 2025-03-03 13:20:06 [RateCDR] => 1 ) [2025-03-03 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-03 10:20:06' and `end` < '2025-03-03 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-03 13:20:19] Production.INFO: count ==6383 [2025-03-03 13:20:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:20:06 - End Time 2025-03-03 13:20:06 [2025-03-03 13:20:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:20:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598731', 'tblTempUsageDetail_20' ) start [2025-03-03 13:20:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598731', 'tblTempUsageDetail_20' ) end [2025-03-03 13:20:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598731', 'tblTempVendorCDR_20' ) start [2025-03-03 13:20:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598731', 'tblTempVendorCDR_20' ) end [2025-03-03 13:20:22] Production.INFO: ProcessCDR(1,14598731,1,1,2) [2025-03-03 13:20:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598731,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:20:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598731,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:20:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598731,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:20:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598731,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:20:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598731', 'tblTempUsageDetail_20' ) start [2025-03-03 13:20:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598731', 'tblTempUsageDetail_20' ) end [2025-03-03 13:20:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:20:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:20:28] Production.INFO: ==22343== Releasing lock... [2025-03-03 13:20:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:20:28] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 13:21:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:21:06 [end_date_ymd] => 2025-03-03 13:21:06 [RateCDR] => 1 ) [2025-03-03 13:21:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 10:21:06' and `end` < '2025-03-03 13:21:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 13:21:19] Production.INFO: count ==6392 [2025-03-03 13:21:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:21:06 - End Time 2025-03-03 13:21:06 [2025-03-03 13:21:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:21:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598736', 'tblTempUsageDetail_20' ) start [2025-03-03 13:21:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598736', 'tblTempUsageDetail_20' ) end [2025-03-03 13:21:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598736', 'tblTempVendorCDR_20' ) start [2025-03-03 13:21:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598736', 'tblTempVendorCDR_20' ) end [2025-03-03 13:21:22] Production.INFO: ProcessCDR(1,14598736,1,1,2) [2025-03-03 13:21:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598736,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:21:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598736,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:21:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598736,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:21:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598736,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:21:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598736', 'tblTempUsageDetail_20' ) start [2025-03-03 13:21:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598736', 'tblTempUsageDetail_20' ) end [2025-03-03 13:21:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:21:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:21:27] Production.INFO: ==22415== Releasing lock... [2025-03-03 13:21:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:21:27] Production.INFO: 76 MB #Memory Used# [2025-03-03 13:22:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:22:05 [end_date_ymd] => 2025-03-03 13:22:05 [RateCDR] => 1 ) [2025-03-03 13:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 10:22:05' and `end` < '2025-03-03 13:22:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 13:22:19] Production.INFO: count ==6389 [2025-03-03 13:22:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:22:05 - End Time 2025-03-03 13:22:05 [2025-03-03 13:22:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:22:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598741', 'tblTempUsageDetail_20' ) start [2025-03-03 13:22:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598741', 'tblTempUsageDetail_20' ) end [2025-03-03 13:22:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598741', 'tblTempVendorCDR_20' ) start [2025-03-03 13:22:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598741', 'tblTempVendorCDR_20' ) end [2025-03-03 13:22:22] Production.INFO: ProcessCDR(1,14598741,1,1,2) [2025-03-03 13:22:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598741,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:22:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598741,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:22:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598741,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:22:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598741,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:22:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598741', 'tblTempUsageDetail_20' ) start [2025-03-03 13:22:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598741', 'tblTempUsageDetail_20' ) end [2025-03-03 13:22:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:22:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:22:27] Production.INFO: ==22485== Releasing lock... [2025-03-03 13:22:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:22:27] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 13:23:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:23:06 [end_date_ymd] => 2025-03-03 13:23:06 [RateCDR] => 1 ) [2025-03-03 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-03 10:23:06' and `end` < '2025-03-03 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-03 13:23:19] Production.INFO: count ==6375 [2025-03-03 13:23:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:23:06 - End Time 2025-03-03 13:23:06 [2025-03-03 13:23:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:23:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598746', 'tblTempUsageDetail_20' ) start [2025-03-03 13:23:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598746', 'tblTempUsageDetail_20' ) end [2025-03-03 13:23:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598746', 'tblTempVendorCDR_20' ) start [2025-03-03 13:23:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598746', 'tblTempVendorCDR_20' ) end [2025-03-03 13:23:23] Production.INFO: ProcessCDR(1,14598746,1,1,2) [2025-03-03 13:23:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598746,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:23:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598746,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:23:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598746,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:23:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598746,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:23:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598746', 'tblTempUsageDetail_20' ) start [2025-03-03 13:23:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598746', 'tblTempUsageDetail_20' ) end [2025-03-03 13:23:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:23:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:23:28] Production.INFO: ==22559== Releasing lock... [2025-03-03 13:23:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:23:28] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 13:24:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:24:06 [end_date_ymd] => 2025-03-03 13:24:06 [RateCDR] => 1 ) [2025-03-03 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-03 10:24:06' and `end` < '2025-03-03 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-03 13:24:19] Production.INFO: count ==6370 [2025-03-03 13:24:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:24:06 - End Time 2025-03-03 13:24:06 [2025-03-03 13:24:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:24:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598751', 'tblTempUsageDetail_20' ) start [2025-03-03 13:24:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598751', 'tblTempUsageDetail_20' ) end [2025-03-03 13:24:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598751', 'tblTempVendorCDR_20' ) start [2025-03-03 13:24:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598751', 'tblTempVendorCDR_20' ) end [2025-03-03 13:24:22] Production.INFO: ProcessCDR(1,14598751,1,1,2) [2025-03-03 13:24:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598751,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:24:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598751,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:24:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598751,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:24:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598751,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:24:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598751', 'tblTempUsageDetail_20' ) start [2025-03-03 13:24:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598751', 'tblTempUsageDetail_20' ) end [2025-03-03 13:24:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:24:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:24:28] Production.INFO: ==22636== Releasing lock... [2025-03-03 13:24:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:24:28] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 13:25:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:25:06 [end_date_ymd] => 2025-03-03 13:25:06 [RateCDR] => 1 ) [2025-03-03 13:25:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 10:25:06' and `end` < '2025-03-03 13:25:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 13:25:19] Production.INFO: count ==6366 [2025-03-03 13:25:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:25:06 - End Time 2025-03-03 13:25:06 [2025-03-03 13:25:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:25:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598756', 'tblTempUsageDetail_20' ) start [2025-03-03 13:25:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598756', 'tblTempUsageDetail_20' ) end [2025-03-03 13:25:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598756', 'tblTempVendorCDR_20' ) start [2025-03-03 13:25:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598756', 'tblTempVendorCDR_20' ) end [2025-03-03 13:25:22] Production.INFO: ProcessCDR(1,14598756,1,1,2) [2025-03-03 13:25:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598756,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:25:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598756,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:25:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598756,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:25:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598756,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:25:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598756', 'tblTempUsageDetail_20' ) start [2025-03-03 13:25:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598756', 'tblTempUsageDetail_20' ) end [2025-03-03 13:25:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:25:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:25:27] Production.INFO: ==22710== Releasing lock... [2025-03-03 13:25:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:25:27] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 13:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:26:05 [end_date_ymd] => 2025-03-03 13:26:05 [RateCDR] => 1 ) [2025-03-03 13:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 10:26:05' and `end` < '2025-03-03 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-03 13:26:19] Production.INFO: count ==6378 [2025-03-03 13:26:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:26:05 - End Time 2025-03-03 13:26:05 [2025-03-03 13:26:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:26:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598761', 'tblTempUsageDetail_20' ) start [2025-03-03 13:26:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598761', 'tblTempUsageDetail_20' ) end [2025-03-03 13:26:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598761', 'tblTempVendorCDR_20' ) start [2025-03-03 13:26:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598761', 'tblTempVendorCDR_20' ) end [2025-03-03 13:26:22] Production.INFO: ProcessCDR(1,14598761,1,1,2) [2025-03-03 13:26:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598761,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:26:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598761,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:26:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598761,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:26:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598761,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:26:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598761', 'tblTempUsageDetail_20' ) start [2025-03-03 13:26:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598761', 'tblTempUsageDetail_20' ) end [2025-03-03 13:26:25] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:26:25] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:26:25] Production.INFO: ==22781== Releasing lock... [2025-03-03 13:26:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:26:25] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 13:27:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:27:06 [end_date_ymd] => 2025-03-03 13:27:06 [RateCDR] => 1 ) [2025-03-03 13:27:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 10:27:06' and `end` < '2025-03-03 13:27:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 13:27:19] Production.INFO: count ==6407 [2025-03-03 13:27:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:27:06 - End Time 2025-03-03 13:27:06 [2025-03-03 13:27:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:27:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598766', 'tblTempUsageDetail_20' ) start [2025-03-03 13:27:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598766', 'tblTempUsageDetail_20' ) end [2025-03-03 13:27:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598766', 'tblTempVendorCDR_20' ) start [2025-03-03 13:27:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598766', 'tblTempVendorCDR_20' ) end [2025-03-03 13:27:22] Production.INFO: ProcessCDR(1,14598766,1,1,2) [2025-03-03 13:27:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598766,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:27:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598766,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:27:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598766,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:27:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598766,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:27:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598766', 'tblTempUsageDetail_20' ) start [2025-03-03 13:27:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598766', 'tblTempUsageDetail_20' ) end [2025-03-03 13:27:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:27:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:27:27] Production.INFO: ==22856== Releasing lock... [2025-03-03 13:27:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:27:27] Production.INFO: 76 MB #Memory Used# [2025-03-03 13:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:28:05 [end_date_ymd] => 2025-03-03 13:28:05 [RateCDR] => 1 ) [2025-03-03 13:28:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 10:28:05' and `end` < '2025-03-03 13:28:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 13:28:18] Production.INFO: count ==6415 [2025-03-03 13:28:21] Production.ERROR: pbx CDR StartTime 2025-03-03 10:28:05 - End Time 2025-03-03 13:28:05 [2025-03-03 13:28:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:28:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598771', 'tblTempUsageDetail_20' ) start [2025-03-03 13:28:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598771', 'tblTempUsageDetail_20' ) end [2025-03-03 13:28:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598771', 'tblTempVendorCDR_20' ) start [2025-03-03 13:28:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598771', 'tblTempVendorCDR_20' ) end [2025-03-03 13:28:22] Production.INFO: ProcessCDR(1,14598771,1,1,2) [2025-03-03 13:28:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598771,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:28:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598771,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:28:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598771,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:28:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598771,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:28:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598771', 'tblTempUsageDetail_20' ) start [2025-03-03 13:28:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598771', 'tblTempUsageDetail_20' ) end [2025-03-03 13:28:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:28:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:28:27] Production.INFO: ==22924== Releasing lock... [2025-03-03 13:28:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:28:27] Production.INFO: 76 MB #Memory Used# [2025-03-03 13:29:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:29:06 [end_date_ymd] => 2025-03-03 13:29:06 [RateCDR] => 1 ) [2025-03-03 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-03 10:29:06' and `end` < '2025-03-03 13:29:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 13:29:19] Production.INFO: count ==6449 [2025-03-03 13:29:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:29:06 - End Time 2025-03-03 13:29:06 [2025-03-03 13:29:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:29:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598776', 'tblTempUsageDetail_20' ) start [2025-03-03 13:29:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598776', 'tblTempUsageDetail_20' ) end [2025-03-03 13:29:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598776', 'tblTempVendorCDR_20' ) start [2025-03-03 13:29:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598776', 'tblTempVendorCDR_20' ) end [2025-03-03 13:29:22] Production.INFO: ProcessCDR(1,14598776,1,1,2) [2025-03-03 13:29:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598776,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:29:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598776,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:29:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598776,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:29:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598776,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:29:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598776', 'tblTempUsageDetail_20' ) start [2025-03-03 13:29:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598776', 'tblTempUsageDetail_20' ) end [2025-03-03 13:29:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:29:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:29:28] Production.INFO: ==23034== Releasing lock... [2025-03-03 13:29:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:29:28] Production.INFO: 76.25 MB #Memory Used# [2025-03-03 13:30:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:30:06 [end_date_ymd] => 2025-03-03 13:30:06 [RateCDR] => 1 ) [2025-03-03 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-03 10:30:06' and `end` < '2025-03-03 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-03 13:30:20] Production.INFO: count ==6429 [2025-03-03 13:30:23] Production.ERROR: pbx CDR StartTime 2025-03-03 10:30:06 - End Time 2025-03-03 13:30:06 [2025-03-03 13:30:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:30:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598781', 'tblTempUsageDetail_20' ) start [2025-03-03 13:30:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598781', 'tblTempUsageDetail_20' ) end [2025-03-03 13:30:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598781', 'tblTempVendorCDR_20' ) start [2025-03-03 13:30:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598781', 'tblTempVendorCDR_20' ) end [2025-03-03 13:30:23] Production.INFO: ProcessCDR(1,14598781,1,1,2) [2025-03-03 13:30:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598781,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:30:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598781,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:30:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598781,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:30:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598781,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:30:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598781', 'tblTempUsageDetail_20' ) start [2025-03-03 13:30:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598781', 'tblTempUsageDetail_20' ) end [2025-03-03 13:30:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:30:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:30:28] Production.INFO: ==23110== Releasing lock... [2025-03-03 13:30:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:30:28] Production.INFO: 76.25 MB #Memory Used# [2025-03-03 13:31:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:31:05 [end_date_ymd] => 2025-03-03 13:31:05 [RateCDR] => 1 ) [2025-03-03 13:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 10:31:05' and `end` < '2025-03-03 13:31:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 13:31:18] Production.INFO: count ==6467 [2025-03-03 13:31:21] Production.ERROR: pbx CDR StartTime 2025-03-03 10:31:05 - End Time 2025-03-03 13:31:05 [2025-03-03 13:31:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:31:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598787', 'tblTempUsageDetail_20' ) start [2025-03-03 13:31:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598787', 'tblTempUsageDetail_20' ) end [2025-03-03 13:31:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598787', 'tblTempVendorCDR_20' ) start [2025-03-03 13:31:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598787', 'tblTempVendorCDR_20' ) end [2025-03-03 13:31:21] Production.INFO: ProcessCDR(1,14598787,1,1,2) [2025-03-03 13:31:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598787,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:31:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598787,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:31:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598787,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:31:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598787,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:31:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598787', 'tblTempUsageDetail_20' ) start [2025-03-03 13:31:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598787', 'tblTempUsageDetail_20' ) end [2025-03-03 13:31:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:31:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:31:27] Production.INFO: ==23186== Releasing lock... [2025-03-03 13:31:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:31:27] Production.INFO: 76.5 MB #Memory Used# [2025-03-03 13:32:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:32:06 [end_date_ymd] => 2025-03-03 13:32:06 [RateCDR] => 1 ) [2025-03-03 13: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-03 10:32:06' and `end` < '2025-03-03 13: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-03 13:32:20] Production.INFO: count ==6475 [2025-03-03 13:32:23] Production.ERROR: pbx CDR StartTime 2025-03-03 10:32:06 - End Time 2025-03-03 13:32:06 [2025-03-03 13:32:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:32:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598792', 'tblTempUsageDetail_20' ) start [2025-03-03 13:32:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598792', 'tblTempUsageDetail_20' ) end [2025-03-03 13:32:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598792', 'tblTempVendorCDR_20' ) start [2025-03-03 13:32:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598792', 'tblTempVendorCDR_20' ) end [2025-03-03 13:32:23] Production.INFO: ProcessCDR(1,14598792,1,1,2) [2025-03-03 13:32:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598792,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:32:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598792,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:32:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598792,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:32:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598792,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:32:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598792', 'tblTempUsageDetail_20' ) start [2025-03-03 13:32:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598792', 'tblTempUsageDetail_20' ) end [2025-03-03 13:32:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:32:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:32:28] Production.INFO: ==23260== Releasing lock... [2025-03-03 13:32:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:32:28] Production.INFO: 76.5 MB #Memory Used# [2025-03-03 13:33:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:33:05 [end_date_ymd] => 2025-03-03 13:33:05 [RateCDR] => 1 ) [2025-03-03 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-03 10:33:05' and `end` < '2025-03-03 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-03 13:33:18] Production.INFO: count ==6484 [2025-03-03 13:33:21] Production.ERROR: pbx CDR StartTime 2025-03-03 10:33:05 - End Time 2025-03-03 13:33:05 [2025-03-03 13:33:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:33:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598797', 'tblTempUsageDetail_20' ) start [2025-03-03 13:33:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598797', 'tblTempUsageDetail_20' ) end [2025-03-03 13:33:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598797', 'tblTempVendorCDR_20' ) start [2025-03-03 13:33:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598797', 'tblTempVendorCDR_20' ) end [2025-03-03 13:33:21] Production.INFO: ProcessCDR(1,14598797,1,1,2) [2025-03-03 13:33:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598797,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:33:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598797,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:33:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598797,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:33:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598797,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:33:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598797', 'tblTempUsageDetail_20' ) start [2025-03-03 13:33:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598797', 'tblTempUsageDetail_20' ) end [2025-03-03 13:33:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:33:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:33:27] Production.INFO: ==23333== Releasing lock... [2025-03-03 13:33:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:33:27] Production.INFO: 76.5 MB #Memory Used# [2025-03-03 13:34:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:34:06 [end_date_ymd] => 2025-03-03 13:34:06 [RateCDR] => 1 ) [2025-03-03 13: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-03 10:34:06' and `end` < '2025-03-03 13: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-03 13:34:19] Production.INFO: count ==6477 [2025-03-03 13:34:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:34:06 - End Time 2025-03-03 13:34:06 [2025-03-03 13:34:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:34:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598802', 'tblTempUsageDetail_20' ) start [2025-03-03 13:34:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598802', 'tblTempUsageDetail_20' ) end [2025-03-03 13:34:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598802', 'tblTempVendorCDR_20' ) start [2025-03-03 13:34:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598802', 'tblTempVendorCDR_20' ) end [2025-03-03 13:34:22] Production.INFO: ProcessCDR(1,14598802,1,1,2) [2025-03-03 13:34:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598802,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:34:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598802,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:34:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598802,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:34:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598802,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:34:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598802', 'tblTempUsageDetail_20' ) start [2025-03-03 13:34:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598802', 'tblTempUsageDetail_20' ) end [2025-03-03 13:34:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:34:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:34:27] Production.INFO: ==23406== Releasing lock... [2025-03-03 13:34:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:34:27] Production.INFO: 76.5 MB #Memory Used# [2025-03-03 13:35:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:35:05 [end_date_ymd] => 2025-03-03 13:35:05 [RateCDR] => 1 ) [2025-03-03 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-03 10:35:05' and `end` < '2025-03-03 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-03 13:35:19] Production.INFO: count ==6465 [2025-03-03 13:35:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:35:05 - End Time 2025-03-03 13:35:05 [2025-03-03 13:35:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:35:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598807', 'tblTempUsageDetail_20' ) start [2025-03-03 13:35:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598807', 'tblTempUsageDetail_20' ) end [2025-03-03 13:35:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598807', 'tblTempVendorCDR_20' ) start [2025-03-03 13:35:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598807', 'tblTempVendorCDR_20' ) end [2025-03-03 13:35:22] Production.INFO: ProcessCDR(1,14598807,1,1,2) [2025-03-03 13:35:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598807,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:35:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598807,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:35:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598807,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:35:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598807,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:35:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598807', 'tblTempUsageDetail_20' ) start [2025-03-03 13:35:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598807', 'tblTempUsageDetail_20' ) end [2025-03-03 13:35:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:35:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:35:27] Production.INFO: ==23477== Releasing lock... [2025-03-03 13:35:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:35:27] Production.INFO: 76.5 MB #Memory Used# [2025-03-03 13:36:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:36:06 [end_date_ymd] => 2025-03-03 13:36:06 [RateCDR] => 1 ) [2025-03-03 13: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-03 10:36:06' and `end` < '2025-03-03 13: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-03 13:36:19] Production.INFO: count ==6481 [2025-03-03 13:36:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:36:06 - End Time 2025-03-03 13:36:06 [2025-03-03 13:36:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:36:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598812', 'tblTempUsageDetail_20' ) start [2025-03-03 13:36:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598812', 'tblTempUsageDetail_20' ) end [2025-03-03 13:36:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598812', 'tblTempVendorCDR_20' ) start [2025-03-03 13:36:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598812', 'tblTempVendorCDR_20' ) end [2025-03-03 13:36:23] Production.INFO: ProcessCDR(1,14598812,1,1,2) [2025-03-03 13:36:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598812,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:36:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598812,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:36:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598812,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:36:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598812,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:36:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598812', 'tblTempUsageDetail_20' ) start [2025-03-03 13:36:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598812', 'tblTempUsageDetail_20' ) end [2025-03-03 13:36:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:36:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:36:28] Production.INFO: ==23549== Releasing lock... [2025-03-03 13:36:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:36:28] Production.INFO: 76.5 MB #Memory Used# [2025-03-03 13:37:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:37:05 [end_date_ymd] => 2025-03-03 13:37:05 [RateCDR] => 1 ) [2025-03-03 13:37:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 10:37:05' and `end` < '2025-03-03 13:37:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 13:37:19] Production.INFO: count ==6460 [2025-03-03 13:37:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:37:05 - End Time 2025-03-03 13:37:05 [2025-03-03 13:37:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:37:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598817', 'tblTempUsageDetail_20' ) start [2025-03-03 13:37:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598817', 'tblTempUsageDetail_20' ) end [2025-03-03 13:37:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598817', 'tblTempVendorCDR_20' ) start [2025-03-03 13:37:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598817', 'tblTempVendorCDR_20' ) end [2025-03-03 13:37:22] Production.INFO: ProcessCDR(1,14598817,1,1,2) [2025-03-03 13:37:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598817,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:37:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598817,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:37:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598817,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:37:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598817,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:37:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598817', 'tblTempUsageDetail_20' ) start [2025-03-03 13:37:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598817', 'tblTempUsageDetail_20' ) end [2025-03-03 13:37:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:37:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:37:27] Production.INFO: ==23622== Releasing lock... [2025-03-03 13:37:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:37:27] Production.INFO: 76.5 MB #Memory Used# [2025-03-03 13:38:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:38:06 [end_date_ymd] => 2025-03-03 13:38:06 [RateCDR] => 1 ) [2025-03-03 13: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-03 10:38:06' and `end` < '2025-03-03 13: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-03 13:38:19] Production.INFO: count ==6459 [2025-03-03 13:38:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:38:06 - End Time 2025-03-03 13:38:06 [2025-03-03 13:38:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:38:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598822', 'tblTempUsageDetail_20' ) start [2025-03-03 13:38:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598822', 'tblTempUsageDetail_20' ) end [2025-03-03 13:38:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598822', 'tblTempVendorCDR_20' ) start [2025-03-03 13:38:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598822', 'tblTempVendorCDR_20' ) end [2025-03-03 13:38:22] Production.INFO: ProcessCDR(1,14598822,1,1,2) [2025-03-03 13:38:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598822,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:38:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598822,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:38:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598822,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:38:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598822,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:38:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598822', 'tblTempUsageDetail_20' ) start [2025-03-03 13:38:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598822', 'tblTempUsageDetail_20' ) end [2025-03-03 13:38:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:38:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:38:28] Production.INFO: ==23698== Releasing lock... [2025-03-03 13:38:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:38:28] Production.INFO: 76.5 MB #Memory Used# [2025-03-03 13:39:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:39:05 [end_date_ymd] => 2025-03-03 13:39:05 [RateCDR] => 1 ) [2025-03-03 13:39:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 10:39:05' and `end` < '2025-03-03 13:39:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 13:39:19] Production.INFO: count ==6554 [2025-03-03 13:39:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:39:05 - End Time 2025-03-03 13:39:05 [2025-03-03 13:39:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:39:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598827', 'tblTempUsageDetail_20' ) start [2025-03-03 13:39:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598827', 'tblTempUsageDetail_20' ) end [2025-03-03 13:39:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598827', 'tblTempVendorCDR_20' ) start [2025-03-03 13:39:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598827', 'tblTempVendorCDR_20' ) end [2025-03-03 13:39:22] Production.INFO: ProcessCDR(1,14598827,1,1,2) [2025-03-03 13:39:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598827,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:39:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598827,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:39:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598827,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:39:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598827,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:39:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598827', 'tblTempUsageDetail_20' ) start [2025-03-03 13:39:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598827', 'tblTempUsageDetail_20' ) end [2025-03-03 13:39:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:39:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:39:27] Production.INFO: ==23768== Releasing lock... [2025-03-03 13:39:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:39:27] Production.INFO: 77 MB #Memory Used# [2025-03-03 13:40:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:40:06 [end_date_ymd] => 2025-03-03 13:40:06 [RateCDR] => 1 ) [2025-03-03 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-03 10:40:06' and `end` < '2025-03-03 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-03 13:40:19] Production.INFO: count ==6586 [2025-03-03 13:40:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:40:06 - End Time 2025-03-03 13:40:06 [2025-03-03 13:40:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:40:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598832', 'tblTempUsageDetail_20' ) start [2025-03-03 13:40:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598832', 'tblTempUsageDetail_20' ) end [2025-03-03 13:40:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598832', 'tblTempVendorCDR_20' ) start [2025-03-03 13:40:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598832', 'tblTempVendorCDR_20' ) end [2025-03-03 13:40:23] Production.INFO: ProcessCDR(1,14598832,1,1,2) [2025-03-03 13:40:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598832,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:40:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598832,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:40:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598832,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:40:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598832,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:40:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598832', 'tblTempUsageDetail_20' ) start [2025-03-03 13:40:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598832', 'tblTempUsageDetail_20' ) end [2025-03-03 13:40:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:40:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:40:28] Production.INFO: ==23840== Releasing lock... [2025-03-03 13:40:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:40:28] Production.INFO: 77.25 MB #Memory Used# [2025-03-03 13:41:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:41:05 [end_date_ymd] => 2025-03-03 13:41:05 [RateCDR] => 1 ) [2025-03-03 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-03 10:41:05' and `end` < '2025-03-03 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-03 13:41:18] Production.INFO: count ==6639 [2025-03-03 13:41:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:41:05 - End Time 2025-03-03 13:41:05 [2025-03-03 13:41:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:41:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598838', 'tblTempUsageDetail_20' ) start [2025-03-03 13:41:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598838', 'tblTempUsageDetail_20' ) end [2025-03-03 13:41:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598838', 'tblTempVendorCDR_20' ) start [2025-03-03 13:41:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598838', 'tblTempVendorCDR_20' ) end [2025-03-03 13:41:22] Production.INFO: ProcessCDR(1,14598838,1,1,2) [2025-03-03 13:41:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598838,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:41:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598838,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:41:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598838,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:41:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598838,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:41:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598838', 'tblTempUsageDetail_20' ) start [2025-03-03 13:41:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598838', 'tblTempUsageDetail_20' ) end [2025-03-03 13:41:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:41:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:41:28] Production.INFO: ==23913== Releasing lock... [2025-03-03 13:41:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:41:28] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 13:42:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:42:05 [end_date_ymd] => 2025-03-03 13:42:05 [RateCDR] => 1 ) [2025-03-03 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-03 10:42:05' and `end` < '2025-03-03 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-03 13:42:19] Production.INFO: count ==6648 [2025-03-03 13:42:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:42:05 - End Time 2025-03-03 13:42:05 [2025-03-03 13:42:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:42:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598843', 'tblTempUsageDetail_20' ) start [2025-03-03 13:42:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598843', 'tblTempUsageDetail_20' ) end [2025-03-03 13:42:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598843', 'tblTempVendorCDR_20' ) start [2025-03-03 13:42:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598843', 'tblTempVendorCDR_20' ) end [2025-03-03 13:42:22] Production.INFO: ProcessCDR(1,14598843,1,1,2) [2025-03-03 13:42:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598843,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:42:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598843,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:42:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598843,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:42:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598843,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:42:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598843', 'tblTempUsageDetail_20' ) start [2025-03-03 13:42:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598843', 'tblTempUsageDetail_20' ) end [2025-03-03 13:42:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:42:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:42:28] Production.INFO: ==23987== Releasing lock... [2025-03-03 13:42:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:42:28] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 13:43:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:43:05 [end_date_ymd] => 2025-03-03 13:43:05 [RateCDR] => 1 ) [2025-03-03 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-03 10:43:05' and `end` < '2025-03-03 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-03 13:43:19] Production.INFO: count ==6643 [2025-03-03 13:43:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:43:05 - End Time 2025-03-03 13:43:05 [2025-03-03 13:43:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:43:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598848', 'tblTempUsageDetail_20' ) start [2025-03-03 13:43:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598848', 'tblTempUsageDetail_20' ) end [2025-03-03 13:43:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598848', 'tblTempVendorCDR_20' ) start [2025-03-03 13:43:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598848', 'tblTempVendorCDR_20' ) end [2025-03-03 13:43:22] Production.INFO: ProcessCDR(1,14598848,1,1,2) [2025-03-03 13:43:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598848,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:43:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598848,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:43:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598848,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:43:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598848,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:43:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598848', 'tblTempUsageDetail_20' ) start [2025-03-03 13:43:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598848', 'tblTempUsageDetail_20' ) end [2025-03-03 13:43:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:43:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:43:28] Production.INFO: ==24066== Releasing lock... [2025-03-03 13:43:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:43:28] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 13:44:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:44:05 [end_date_ymd] => 2025-03-03 13:44:05 [RateCDR] => 1 ) [2025-03-03 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-03 10:44:05' and `end` < '2025-03-03 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-03 13:44:19] Production.INFO: count ==6642 [2025-03-03 13:44:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:44:05 - End Time 2025-03-03 13:44:05 [2025-03-03 13:44:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:44:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598853', 'tblTempUsageDetail_20' ) start [2025-03-03 13:44:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598853', 'tblTempUsageDetail_20' ) end [2025-03-03 13:44:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598853', 'tblTempVendorCDR_20' ) start [2025-03-03 13:44:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598853', 'tblTempVendorCDR_20' ) end [2025-03-03 13:44:22] Production.INFO: ProcessCDR(1,14598853,1,1,2) [2025-03-03 13:44:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598853,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:44:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598853,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:44:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598853,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:44:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598853,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:44:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598853', 'tblTempUsageDetail_20' ) start [2025-03-03 13:44:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598853', 'tblTempUsageDetail_20' ) end [2025-03-03 13:44:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:44:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:44:27] Production.INFO: ==24137== Releasing lock... [2025-03-03 13:44:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:44:27] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 13:45:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:45:06 [end_date_ymd] => 2025-03-03 13:45:06 [RateCDR] => 1 ) [2025-03-03 13: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-03 10:45:06' and `end` < '2025-03-03 13: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-03 13:45:19] Production.INFO: count ==6650 [2025-03-03 13:45:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:45:06 - End Time 2025-03-03 13:45:06 [2025-03-03 13:45:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:45:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598858', 'tblTempUsageDetail_20' ) start [2025-03-03 13:45:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598858', 'tblTempUsageDetail_20' ) end [2025-03-03 13:45:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598858', 'tblTempVendorCDR_20' ) start [2025-03-03 13:45:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598858', 'tblTempVendorCDR_20' ) end [2025-03-03 13:45:22] Production.INFO: ProcessCDR(1,14598858,1,1,2) [2025-03-03 13:45:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598858,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:45:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598858,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:45:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598858,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:45:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598858,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:45:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598858', 'tblTempUsageDetail_20' ) start [2025-03-03 13:45:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598858', 'tblTempUsageDetail_20' ) end [2025-03-03 13:45:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:45:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:45:27] Production.INFO: ==24251== Releasing lock... [2025-03-03 13:45:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:45:27] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 13:46:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:46:05 [end_date_ymd] => 2025-03-03 13:46:05 [RateCDR] => 1 ) [2025-03-03 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-03 10:46:05' and `end` < '2025-03-03 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-03 13:46:18] Production.INFO: count ==6642 [2025-03-03 13:46:21] Production.ERROR: pbx CDR StartTime 2025-03-03 10:46:05 - End Time 2025-03-03 13:46:05 [2025-03-03 13:46:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:46:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598863', 'tblTempUsageDetail_20' ) start [2025-03-03 13:46:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598863', 'tblTempUsageDetail_20' ) end [2025-03-03 13:46:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598863', 'tblTempVendorCDR_20' ) start [2025-03-03 13:46:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598863', 'tblTempVendorCDR_20' ) end [2025-03-03 13:46:22] Production.INFO: ProcessCDR(1,14598863,1,1,2) [2025-03-03 13:46:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598863,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:46:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598863,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:46:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598863,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:46:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598863,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:46:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598863', 'tblTempUsageDetail_20' ) start [2025-03-03 13:46:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598863', 'tblTempUsageDetail_20' ) end [2025-03-03 13:46:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:46:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:46:26] Production.INFO: ==24324== Releasing lock... [2025-03-03 13:46:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:46:26] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 13:47:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:47:05 [end_date_ymd] => 2025-03-03 13:47:05 [RateCDR] => 1 ) [2025-03-03 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-03 10:47:05' and `end` < '2025-03-03 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-03 13:47:19] Production.INFO: count ==6634 [2025-03-03 13:47:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:47:05 - End Time 2025-03-03 13:47:05 [2025-03-03 13:47:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:47:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598868', 'tblTempUsageDetail_20' ) start [2025-03-03 13:47:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598868', 'tblTempUsageDetail_20' ) end [2025-03-03 13:47:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598868', 'tblTempVendorCDR_20' ) start [2025-03-03 13:47:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598868', 'tblTempVendorCDR_20' ) end [2025-03-03 13:47:22] Production.INFO: ProcessCDR(1,14598868,1,1,2) [2025-03-03 13:47:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598868,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:47:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598868,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:47:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598868,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:47:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598868,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:47:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598868', 'tblTempUsageDetail_20' ) start [2025-03-03 13:47:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598868', 'tblTempUsageDetail_20' ) end [2025-03-03 13:47:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:47:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:47:27] Production.INFO: ==24394== Releasing lock... [2025-03-03 13:47:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:47:27] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 13:48:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:48:06 [end_date_ymd] => 2025-03-03 13:48:06 [RateCDR] => 1 ) [2025-03-03 13:48:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 10:48:06' and `end` < '2025-03-03 13:48:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 13:48:19] Production.INFO: count ==6641 [2025-03-03 13:48:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:48:06 - End Time 2025-03-03 13:48:06 [2025-03-03 13:48:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:48:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598873', 'tblTempUsageDetail_20' ) start [2025-03-03 13:48:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598873', 'tblTempUsageDetail_20' ) end [2025-03-03 13:48:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598873', 'tblTempVendorCDR_20' ) start [2025-03-03 13:48:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598873', 'tblTempVendorCDR_20' ) end [2025-03-03 13:48:22] Production.INFO: ProcessCDR(1,14598873,1,1,2) [2025-03-03 13:48:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598873,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:48:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598873,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:48:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598873,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:48:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598873,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:48:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598873', 'tblTempUsageDetail_20' ) start [2025-03-03 13:48:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598873', 'tblTempUsageDetail_20' ) end [2025-03-03 13:48:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:48:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:48:28] Production.INFO: ==24465== Releasing lock... [2025-03-03 13:48:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:48:28] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 13:49:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:49:06 [end_date_ymd] => 2025-03-03 13:49:06 [RateCDR] => 1 ) [2025-03-03 13: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-03 10:49:06' and `end` < '2025-03-03 13: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-03 13:49:19] Production.INFO: count ==6619 [2025-03-03 13:49:23] Production.ERROR: pbx CDR StartTime 2025-03-03 10:49:06 - End Time 2025-03-03 13:49:06 [2025-03-03 13:49:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:49:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598878', 'tblTempUsageDetail_20' ) start [2025-03-03 13:49:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598878', 'tblTempUsageDetail_20' ) end [2025-03-03 13:49:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598878', 'tblTempVendorCDR_20' ) start [2025-03-03 13:49:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598878', 'tblTempVendorCDR_20' ) end [2025-03-03 13:49:23] Production.INFO: ProcessCDR(1,14598878,1,1,2) [2025-03-03 13:49:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598878,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:49:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598878,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:49:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598878,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:49:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598878,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:49:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598878', 'tblTempUsageDetail_20' ) start [2025-03-03 13:49:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598878', 'tblTempUsageDetail_20' ) end [2025-03-03 13:49:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:49:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:49:28] Production.INFO: ==24536== Releasing lock... [2025-03-03 13:49:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:49:28] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 13:50:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:50:06 [end_date_ymd] => 2025-03-03 13:50:06 [RateCDR] => 1 ) [2025-03-03 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-03 10:50:06' and `end` < '2025-03-03 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-03 13:50:19] Production.INFO: count ==6626 [2025-03-03 13:50:23] Production.ERROR: pbx CDR StartTime 2025-03-03 10:50:06 - End Time 2025-03-03 13:50:06 [2025-03-03 13:50:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:50:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598884', 'tblTempUsageDetail_20' ) start [2025-03-03 13:50:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598884', 'tblTempUsageDetail_20' ) end [2025-03-03 13:50:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598884', 'tblTempVendorCDR_20' ) start [2025-03-03 13:50:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598884', 'tblTempVendorCDR_20' ) end [2025-03-03 13:50:23] Production.INFO: ProcessCDR(1,14598884,1,1,2) [2025-03-03 13:50:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598884,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:50:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598884,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:50:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598884,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:50:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598884,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:50:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598884', 'tblTempUsageDetail_20' ) start [2025-03-03 13:50:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598884', 'tblTempUsageDetail_20' ) end [2025-03-03 13:50:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:50:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:50:28] Production.INFO: ==24608== Releasing lock... [2025-03-03 13:50:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:50:28] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 13:51:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:51:06 [end_date_ymd] => 2025-03-03 13:51:06 [RateCDR] => 1 ) [2025-03-03 13: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-03 10:51:06' and `end` < '2025-03-03 13: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-03 13:51:19] Production.INFO: count ==6623 [2025-03-03 13:51:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:51:06 - End Time 2025-03-03 13:51:06 [2025-03-03 13:51:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:51:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598889', 'tblTempUsageDetail_20' ) start [2025-03-03 13:51:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598889', 'tblTempUsageDetail_20' ) end [2025-03-03 13:51:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598889', 'tblTempVendorCDR_20' ) start [2025-03-03 13:51:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598889', 'tblTempVendorCDR_20' ) end [2025-03-03 13:51:22] Production.INFO: ProcessCDR(1,14598889,1,1,2) [2025-03-03 13:51:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598889,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:51:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598889,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:51:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598889,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:51:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598889,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:51:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598889', 'tblTempUsageDetail_20' ) start [2025-03-03 13:51:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598889', 'tblTempUsageDetail_20' ) end [2025-03-03 13:51:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:51:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:51:28] Production.INFO: ==24681== Releasing lock... [2025-03-03 13:51:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:51:28] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 13:52:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:52:05 [end_date_ymd] => 2025-03-03 13:52:05 [RateCDR] => 1 ) [2025-03-03 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-03 10:52:05' and `end` < '2025-03-03 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-03 13:52:19] Production.INFO: count ==6603 [2025-03-03 13:52:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:52:05 - End Time 2025-03-03 13:52:05 [2025-03-03 13:52:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:52:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598894', 'tblTempUsageDetail_20' ) start [2025-03-03 13:52:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598894', 'tblTempUsageDetail_20' ) end [2025-03-03 13:52:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598894', 'tblTempVendorCDR_20' ) start [2025-03-03 13:52:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598894', 'tblTempVendorCDR_20' ) end [2025-03-03 13:52:22] Production.INFO: ProcessCDR(1,14598894,1,1,2) [2025-03-03 13:52:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598894,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:52:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598894,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:52:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598894,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:52:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598894,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:52:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598894', 'tblTempUsageDetail_20' ) start [2025-03-03 13:52:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598894', 'tblTempUsageDetail_20' ) end [2025-03-03 13:52:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:52:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:52:27] Production.INFO: ==24752== Releasing lock... [2025-03-03 13:52:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:52:27] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 13:53:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:53:06 [end_date_ymd] => 2025-03-03 13:53:06 [RateCDR] => 1 ) [2025-03-03 13: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-03 10:53:06' and `end` < '2025-03-03 13: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-03 13:53:19] Production.INFO: count ==6614 [2025-03-03 13:53:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:53:06 - End Time 2025-03-03 13:53:06 [2025-03-03 13:53:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:53:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598899', 'tblTempUsageDetail_20' ) start [2025-03-03 13:53:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598899', 'tblTempUsageDetail_20' ) end [2025-03-03 13:53:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598899', 'tblTempVendorCDR_20' ) start [2025-03-03 13:53:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598899', 'tblTempVendorCDR_20' ) end [2025-03-03 13:53:23] Production.INFO: ProcessCDR(1,14598899,1,1,2) [2025-03-03 13:53:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598899,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:53:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598899,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:53:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598899,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:53:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598899,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:53:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598899', 'tblTempUsageDetail_20' ) start [2025-03-03 13:53:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598899', 'tblTempUsageDetail_20' ) end [2025-03-03 13:53:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:53:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:53:28] Production.INFO: ==24823== Releasing lock... [2025-03-03 13:53:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:53:28] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 13:54:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:54:05 [end_date_ymd] => 2025-03-03 13:54:05 [RateCDR] => 1 ) [2025-03-03 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-03 10:54:05' and `end` < '2025-03-03 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-03 13:54:18] Production.INFO: count ==6609 [2025-03-03 13:54:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:54:05 - End Time 2025-03-03 13:54:05 [2025-03-03 13:54:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:54:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598904', 'tblTempUsageDetail_20' ) start [2025-03-03 13:54:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598904', 'tblTempUsageDetail_20' ) end [2025-03-03 13:54:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598904', 'tblTempVendorCDR_20' ) start [2025-03-03 13:54:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598904', 'tblTempVendorCDR_20' ) end [2025-03-03 13:54:22] Production.INFO: ProcessCDR(1,14598904,1,1,2) [2025-03-03 13:54:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598904,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:54:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598904,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:54:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598904,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:54:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598904,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:54:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598904', 'tblTempUsageDetail_20' ) start [2025-03-03 13:54:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598904', 'tblTempUsageDetail_20' ) end [2025-03-03 13:54:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:54:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:54:27] Production.INFO: ==24894== Releasing lock... [2025-03-03 13:54:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:54:27] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 13:55:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:55:06 [end_date_ymd] => 2025-03-03 13:55:06 [RateCDR] => 1 ) [2025-03-03 13: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-03 10:55:06' and `end` < '2025-03-03 13: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-03 13:55:19] Production.INFO: count ==6612 [2025-03-03 13:55:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:55:06 - End Time 2025-03-03 13:55:06 [2025-03-03 13:55:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:55:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598909', 'tblTempUsageDetail_20' ) start [2025-03-03 13:55:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598909', 'tblTempUsageDetail_20' ) end [2025-03-03 13:55:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598909', 'tblTempVendorCDR_20' ) start [2025-03-03 13:55:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598909', 'tblTempVendorCDR_20' ) end [2025-03-03 13:55:23] Production.INFO: ProcessCDR(1,14598909,1,1,2) [2025-03-03 13:55:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598909,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:55:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598909,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:55:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598909,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:55:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598909,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:55:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598909', 'tblTempUsageDetail_20' ) start [2025-03-03 13:55:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598909', 'tblTempUsageDetail_20' ) end [2025-03-03 13:55:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:55:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:55:28] Production.INFO: ==24965== Releasing lock... [2025-03-03 13:55:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:55:28] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 13:56:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:56:05 [end_date_ymd] => 2025-03-03 13:56:05 [RateCDR] => 1 ) [2025-03-03 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-03 10:56:05' and `end` < '2025-03-03 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-03 13:56:18] Production.INFO: count ==6623 [2025-03-03 13:56:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:56:05 - End Time 2025-03-03 13:56:05 [2025-03-03 13:56:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:56:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598914', 'tblTempUsageDetail_20' ) start [2025-03-03 13:56:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598914', 'tblTempUsageDetail_20' ) end [2025-03-03 13:56:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598914', 'tblTempVendorCDR_20' ) start [2025-03-03 13:56:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598914', 'tblTempVendorCDR_20' ) end [2025-03-03 13:56:22] Production.INFO: ProcessCDR(1,14598914,1,1,2) [2025-03-03 13:56:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598914,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:56:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598914,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:56:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598914,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:56:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598914,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:56:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598914', 'tblTempUsageDetail_20' ) start [2025-03-03 13:56:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598914', 'tblTempUsageDetail_20' ) end [2025-03-03 13:56:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:56:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:56:27] Production.INFO: ==25038== Releasing lock... [2025-03-03 13:56:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:56:27] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 13:57:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:57:06 [end_date_ymd] => 2025-03-03 13:57:06 [RateCDR] => 1 ) [2025-03-03 13:57:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 10:57:06' and `end` < '2025-03-03 13:57:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 13:57:19] Production.INFO: count ==6628 [2025-03-03 13:57:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:57:06 - End Time 2025-03-03 13:57:06 [2025-03-03 13:57:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:57:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598919', 'tblTempUsageDetail_20' ) start [2025-03-03 13:57:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598919', 'tblTempUsageDetail_20' ) end [2025-03-03 13:57:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598919', 'tblTempVendorCDR_20' ) start [2025-03-03 13:57:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598919', 'tblTempVendorCDR_20' ) end [2025-03-03 13:57:23] Production.INFO: ProcessCDR(1,14598919,1,1,2) [2025-03-03 13:57:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598919,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:57:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598919,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:57:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598919,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:57:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598919,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:57:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598919', 'tblTempUsageDetail_20' ) start [2025-03-03 13:57:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598919', 'tblTempUsageDetail_20' ) end [2025-03-03 13:57:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:57:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:57:28] Production.INFO: ==25116== Releasing lock... [2025-03-03 13:57:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:57:28] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 13:58:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:58:05 [end_date_ymd] => 2025-03-03 13:58:05 [RateCDR] => 1 ) [2025-03-03 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-03 10:58:05' and `end` < '2025-03-03 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-03 13:58:19] Production.INFO: count ==6626 [2025-03-03 13:58:23] Production.ERROR: pbx CDR StartTime 2025-03-03 10:58:05 - End Time 2025-03-03 13:58:05 [2025-03-03 13:58:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:58:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598924', 'tblTempUsageDetail_20' ) start [2025-03-03 13:58:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598924', 'tblTempUsageDetail_20' ) end [2025-03-03 13:58:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598924', 'tblTempVendorCDR_20' ) start [2025-03-03 13:58:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598924', 'tblTempVendorCDR_20' ) end [2025-03-03 13:58:23] Production.INFO: ProcessCDR(1,14598924,1,1,2) [2025-03-03 13:58:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598924,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:58:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598924,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:58:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598924,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:58:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598924,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:58:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598924', 'tblTempUsageDetail_20' ) start [2025-03-03 13:58:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598924', 'tblTempUsageDetail_20' ) end [2025-03-03 13:58:29] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:58:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:58:29] Production.INFO: ==25187== Releasing lock... [2025-03-03 13:58:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:58:29] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 13:59:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 10:59:05 [end_date_ymd] => 2025-03-03 13:59:05 [RateCDR] => 1 ) [2025-03-03 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-03 10:59:05' and `end` < '2025-03-03 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-03 13:59:19] Production.INFO: count ==6663 [2025-03-03 13:59:22] Production.ERROR: pbx CDR StartTime 2025-03-03 10:59:05 - End Time 2025-03-03 13:59:05 [2025-03-03 13:59:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 13:59:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598929', 'tblTempUsageDetail_20' ) start [2025-03-03 13:59:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598929', 'tblTempUsageDetail_20' ) end [2025-03-03 13:59:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598929', 'tblTempVendorCDR_20' ) start [2025-03-03 13:59:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598929', 'tblTempVendorCDR_20' ) end [2025-03-03 13:59:22] Production.INFO: ProcessCDR(1,14598929,1,1,2) [2025-03-03 13:59:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598929,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:59:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598929,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 13:59:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598929,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:59:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598929,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 13:59:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598929', 'tblTempUsageDetail_20' ) start [2025-03-03 13:59:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598929', 'tblTempUsageDetail_20' ) end [2025-03-03 13:59:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 13:59:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 13:59:27] Production.INFO: ==25258== Releasing lock... [2025-03-03 13:59:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 13:59:27] Production.INFO: 78 MB #Memory Used# [2025-03-03 14:00:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:00:06 [end_date_ymd] => 2025-03-03 14:00:06 [RateCDR] => 1 ) [2025-03-03 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-03 11:00:06' and `end` < '2025-03-03 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-03 14:00:19] Production.INFO: count ==6648 [2025-03-03 14:00:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:00:06 - End Time 2025-03-03 14:00:06 [2025-03-03 14:00:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:00:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598934', 'tblTempUsageDetail_20' ) start [2025-03-03 14:00:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598934', 'tblTempUsageDetail_20' ) end [2025-03-03 14:00:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598934', 'tblTempVendorCDR_20' ) start [2025-03-03 14:00:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598934', 'tblTempVendorCDR_20' ) end [2025-03-03 14:00:22] Production.INFO: ProcessCDR(1,14598934,1,1,2) [2025-03-03 14:00:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598934,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:00:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598934,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:00:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598934,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:00:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598934,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:00:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598934', 'tblTempUsageDetail_20' ) start [2025-03-03 14:00:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598934', 'tblTempUsageDetail_20' ) end [2025-03-03 14:00:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:00:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:00:27] Production.INFO: ==25377== Releasing lock... [2025-03-03 14:00:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:00:27] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 14:01:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:01:06 [end_date_ymd] => 2025-03-03 14:01:06 [RateCDR] => 1 ) [2025-03-03 14: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-03 11:01:06' and `end` < '2025-03-03 14: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-03 14:01:19] Production.INFO: count ==6615 [2025-03-03 14:01:23] Production.ERROR: pbx CDR StartTime 2025-03-03 11:01:06 - End Time 2025-03-03 14:01:06 [2025-03-03 14:01:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:01:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598940', 'tblTempUsageDetail_20' ) start [2025-03-03 14:01:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598940', 'tblTempUsageDetail_20' ) end [2025-03-03 14:01:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598940', 'tblTempVendorCDR_20' ) start [2025-03-03 14:01:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598940', 'tblTempVendorCDR_20' ) end [2025-03-03 14:01:23] Production.INFO: ProcessCDR(1,14598940,1,1,2) [2025-03-03 14:01:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598940,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:01:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598940,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:01:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598940,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:01:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598940,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:01:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598940', 'tblTempUsageDetail_20' ) start [2025-03-03 14:01:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598940', 'tblTempUsageDetail_20' ) end [2025-03-03 14:01:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:01:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:01:28] Production.INFO: ==25463== Releasing lock... [2025-03-03 14:01:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:01:28] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 14:02:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:02:05 [end_date_ymd] => 2025-03-03 14:02:05 [RateCDR] => 1 ) [2025-03-03 14:02:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 11:02:05' and `end` < '2025-03-03 14:02:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 14:02:18] Production.INFO: count ==6581 [2025-03-03 14:02:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:02:05 - End Time 2025-03-03 14:02:05 [2025-03-03 14:02:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:02:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598945', 'tblTempUsageDetail_20' ) start [2025-03-03 14:02:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598945', 'tblTempUsageDetail_20' ) end [2025-03-03 14:02:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598945', 'tblTempVendorCDR_20' ) start [2025-03-03 14:02:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598945', 'tblTempVendorCDR_20' ) end [2025-03-03 14:02:22] Production.INFO: ProcessCDR(1,14598945,1,1,2) [2025-03-03 14:02:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598945,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:02:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598945,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:02:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598945,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:02:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598945,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:02:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598945', 'tblTempUsageDetail_20' ) start [2025-03-03 14:02:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598945', 'tblTempUsageDetail_20' ) end [2025-03-03 14:02:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:02:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:02:27] Production.INFO: ==25534== Releasing lock... [2025-03-03 14:02:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:02:27] Production.INFO: 77.25 MB #Memory Used# [2025-03-03 14:03:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:03:06 [end_date_ymd] => 2025-03-03 14:03:06 [RateCDR] => 1 ) [2025-03-03 14:03:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 11:03:06' and `end` < '2025-03-03 14:03:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 14:03:19] Production.INFO: count ==6590 [2025-03-03 14:03:23] Production.ERROR: pbx CDR StartTime 2025-03-03 11:03:06 - End Time 2025-03-03 14:03:06 [2025-03-03 14:03:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:03:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598950', 'tblTempUsageDetail_20' ) start [2025-03-03 14:03:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598950', 'tblTempUsageDetail_20' ) end [2025-03-03 14:03:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598950', 'tblTempVendorCDR_20' ) start [2025-03-03 14:03:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598950', 'tblTempVendorCDR_20' ) end [2025-03-03 14:03:23] Production.INFO: ProcessCDR(1,14598950,1,1,2) [2025-03-03 14:03:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598950,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:03:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598950,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:03:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598950,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:03:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598950,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:03:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598950', 'tblTempUsageDetail_20' ) start [2025-03-03 14:03:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598950', 'tblTempUsageDetail_20' ) end [2025-03-03 14:03:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:03:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:03:28] Production.INFO: ==25604== Releasing lock... [2025-03-03 14:03:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:03:28] Production.INFO: 77.25 MB #Memory Used# [2025-03-03 14:04:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:04:05 [end_date_ymd] => 2025-03-03 14:04:05 [RateCDR] => 1 ) [2025-03-03 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-03 11:04:05' and `end` < '2025-03-03 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-03 14:04:18] Production.INFO: count ==6590 [2025-03-03 14:04:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:04:05 - End Time 2025-03-03 14:04:05 [2025-03-03 14:04:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:04:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598955', 'tblTempUsageDetail_20' ) start [2025-03-03 14:04:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598955', 'tblTempUsageDetail_20' ) end [2025-03-03 14:04:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598955', 'tblTempVendorCDR_20' ) start [2025-03-03 14:04:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598955', 'tblTempVendorCDR_20' ) end [2025-03-03 14:04:22] Production.INFO: ProcessCDR(1,14598955,1,1,2) [2025-03-03 14:04:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598955,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:04:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598955,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:04:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598955,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:04:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598955,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:04:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598955', 'tblTempUsageDetail_20' ) start [2025-03-03 14:04:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598955', 'tblTempUsageDetail_20' ) end [2025-03-03 14:04:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:04:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:04:27] Production.INFO: ==25679== Releasing lock... [2025-03-03 14:04:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:04:27] Production.INFO: 77.25 MB #Memory Used# [2025-03-03 14:05:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:05:05 [end_date_ymd] => 2025-03-03 14:05:05 [RateCDR] => 1 ) [2025-03-03 14:05:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 11:05:05' and `end` < '2025-03-03 14:05:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 14:05:18] Production.INFO: count ==6562 [2025-03-03 14:05:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:05:05 - End Time 2025-03-03 14:05:05 [2025-03-03 14:05:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:05:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598960', 'tblTempUsageDetail_20' ) start [2025-03-03 14:05:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598960', 'tblTempUsageDetail_20' ) end [2025-03-03 14:05:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598960', 'tblTempVendorCDR_20' ) start [2025-03-03 14:05:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598960', 'tblTempVendorCDR_20' ) end [2025-03-03 14:05:22] Production.INFO: ProcessCDR(1,14598960,1,1,2) [2025-03-03 14:05:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598960,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:05:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598960,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:05:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598960,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:05:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598960,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:05:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598960', 'tblTempUsageDetail_20' ) start [2025-03-03 14:05:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598960', 'tblTempUsageDetail_20' ) end [2025-03-03 14:05:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:05:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:05:27] Production.INFO: ==25749== Releasing lock... [2025-03-03 14:05:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:05:27] Production.INFO: 77.25 MB #Memory Used# [2025-03-03 14:06:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:06:05 [end_date_ymd] => 2025-03-03 14:06:05 [RateCDR] => 1 ) [2025-03-03 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-03 11:06:05' and `end` < '2025-03-03 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-03 14:06:19] Production.INFO: count ==6537 [2025-03-03 14:06:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:06:05 - End Time 2025-03-03 14:06:05 [2025-03-03 14:06:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:06:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598965', 'tblTempUsageDetail_20' ) start [2025-03-03 14:06:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598965', 'tblTempUsageDetail_20' ) end [2025-03-03 14:06:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598965', 'tblTempVendorCDR_20' ) start [2025-03-03 14:06:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598965', 'tblTempVendorCDR_20' ) end [2025-03-03 14:06:22] Production.INFO: ProcessCDR(1,14598965,1,1,2) [2025-03-03 14:06:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598965,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:06:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598965,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:06:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598965,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:06:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598965,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:06:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598965', 'tblTempUsageDetail_20' ) start [2025-03-03 14:06:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598965', 'tblTempUsageDetail_20' ) end [2025-03-03 14:06:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:06:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:06:27] Production.INFO: ==25822== Releasing lock... [2025-03-03 14:06:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:06:27] Production.INFO: 77 MB #Memory Used# [2025-03-03 14:07:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:07:06 [end_date_ymd] => 2025-03-03 14:07:06 [RateCDR] => 1 ) [2025-03-03 14: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-03 11:07:06' and `end` < '2025-03-03 14: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-03 14:07:19] Production.INFO: count ==6540 [2025-03-03 14:07:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:07:06 - End Time 2025-03-03 14:07:06 [2025-03-03 14:07:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:07:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598970', 'tblTempUsageDetail_20' ) start [2025-03-03 14:07:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598970', 'tblTempUsageDetail_20' ) end [2025-03-03 14:07:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598970', 'tblTempVendorCDR_20' ) start [2025-03-03 14:07:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598970', 'tblTempVendorCDR_20' ) end [2025-03-03 14:07:23] Production.INFO: ProcessCDR(1,14598970,1,1,2) [2025-03-03 14:07:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598970,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:07:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598970,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:07:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598970,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:07:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598970,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:07:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598970', 'tblTempUsageDetail_20' ) start [2025-03-03 14:07:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598970', 'tblTempUsageDetail_20' ) end [2025-03-03 14:07:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:07:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:07:28] Production.INFO: ==25903== Releasing lock... [2025-03-03 14:07:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:07:28] Production.INFO: 77 MB #Memory Used# [2025-03-03 14:08:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:08:05 [end_date_ymd] => 2025-03-03 14:08:05 [RateCDR] => 1 ) [2025-03-03 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-03 11:08:05' and `end` < '2025-03-03 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-03 14:08:18] Production.INFO: count ==6563 [2025-03-03 14:08:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:08:05 - End Time 2025-03-03 14:08:05 [2025-03-03 14:08:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:08:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598975', 'tblTempUsageDetail_20' ) start [2025-03-03 14:08:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598975', 'tblTempUsageDetail_20' ) end [2025-03-03 14:08:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598975', 'tblTempVendorCDR_20' ) start [2025-03-03 14:08:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598975', 'tblTempVendorCDR_20' ) end [2025-03-03 14:08:22] Production.INFO: ProcessCDR(1,14598975,1,1,2) [2025-03-03 14:08:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598975,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:08:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598975,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:08:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598975,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:08:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598975,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:08:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598975', 'tblTempUsageDetail_20' ) start [2025-03-03 14:08:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598975', 'tblTempUsageDetail_20' ) end [2025-03-03 14:08:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:08:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:08:27] Production.INFO: ==25978== Releasing lock... [2025-03-03 14:08:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:08:27] Production.INFO: 77.25 MB #Memory Used# [2025-03-03 14:09:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:09:06 [end_date_ymd] => 2025-03-03 14:09:06 [RateCDR] => 1 ) [2025-03-03 14: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-03 11:09:06' and `end` < '2025-03-03 14: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-03 14:09:19] Production.INFO: count ==6572 [2025-03-03 14:09:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:09:06 - End Time 2025-03-03 14:09:06 [2025-03-03 14:09:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:09:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598980', 'tblTempUsageDetail_20' ) start [2025-03-03 14:09:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598980', 'tblTempUsageDetail_20' ) end [2025-03-03 14:09:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598980', 'tblTempVendorCDR_20' ) start [2025-03-03 14:09:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598980', 'tblTempVendorCDR_20' ) end [2025-03-03 14:09:23] Production.INFO: ProcessCDR(1,14598980,1,1,2) [2025-03-03 14:09:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598980,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:09:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598980,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:09:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598980,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:09:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598980,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:09:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598980', 'tblTempUsageDetail_20' ) start [2025-03-03 14:09:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598980', 'tblTempUsageDetail_20' ) end [2025-03-03 14:09:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:09:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:09:28] Production.INFO: ==26050== Releasing lock... [2025-03-03 14:09:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:09:28] Production.INFO: 77.25 MB #Memory Used# [2025-03-03 14:10:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:10:06 [end_date_ymd] => 2025-03-03 14:10:06 [RateCDR] => 1 ) [2025-03-03 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-03 11:10:06' and `end` < '2025-03-03 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-03 14:10:20] Production.INFO: count ==6606 [2025-03-03 14:10:23] Production.ERROR: pbx CDR StartTime 2025-03-03 11:10:06 - End Time 2025-03-03 14:10:06 [2025-03-03 14:10:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:10:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598986', 'tblTempUsageDetail_20' ) start [2025-03-03 14:10:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598986', 'tblTempUsageDetail_20' ) end [2025-03-03 14:10:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598986', 'tblTempVendorCDR_20' ) start [2025-03-03 14:10:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598986', 'tblTempVendorCDR_20' ) end [2025-03-03 14:10:23] Production.INFO: ProcessCDR(1,14598986,1,1,2) [2025-03-03 14:10:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598986,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:10:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598986,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:10:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598986,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:10:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598986,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:10:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598986', 'tblTempUsageDetail_20' ) start [2025-03-03 14:10:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598986', 'tblTempUsageDetail_20' ) end [2025-03-03 14:10:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:10:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:10:28] Production.INFO: ==26127== Releasing lock... [2025-03-03 14:10:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:10:28] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 14:11:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:11:05 [end_date_ymd] => 2025-03-03 14:11:05 [RateCDR] => 1 ) [2025-03-03 14:11:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 11:11:05' and `end` < '2025-03-03 14:11:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 14:11:19] Production.INFO: count ==6634 [2025-03-03 14:11:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:11:05 - End Time 2025-03-03 14:11:05 [2025-03-03 14:11:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:11:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598991', 'tblTempUsageDetail_20' ) start [2025-03-03 14:11:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598991', 'tblTempUsageDetail_20' ) end [2025-03-03 14:11:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598991', 'tblTempVendorCDR_20' ) start [2025-03-03 14:11:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598991', 'tblTempVendorCDR_20' ) end [2025-03-03 14:11:23] Production.INFO: ProcessCDR(1,14598991,1,1,2) [2025-03-03 14:11:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598991,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:11:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598991,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:11:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598991,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:11:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598991,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:11:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598991', 'tblTempUsageDetail_20' ) start [2025-03-03 14:11:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598991', 'tblTempUsageDetail_20' ) end [2025-03-03 14:11:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:11:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:11:28] Production.INFO: ==26201== Releasing lock... [2025-03-03 14:11:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:11:28] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 14:12:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:12:05 [end_date_ymd] => 2025-03-03 14:12:05 [RateCDR] => 1 ) [2025-03-03 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-03 11:12:05' and `end` < '2025-03-03 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-03 14:12:18] Production.INFO: count ==6674 [2025-03-03 14:12:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:12:05 - End Time 2025-03-03 14:12:05 [2025-03-03 14:12:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:12:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598996', 'tblTempUsageDetail_20' ) start [2025-03-03 14:12:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14598996', 'tblTempUsageDetail_20' ) end [2025-03-03 14:12:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598996', 'tblTempVendorCDR_20' ) start [2025-03-03 14:12:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14598996', 'tblTempVendorCDR_20' ) end [2025-03-03 14:12:22] Production.INFO: ProcessCDR(1,14598996,1,1,2) [2025-03-03 14:12:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14598996,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:12:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14598996,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:12:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14598996,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:12:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14598996,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:12:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598996', 'tblTempUsageDetail_20' ) start [2025-03-03 14:12:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14598996', 'tblTempUsageDetail_20' ) end [2025-03-03 14:12:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:12:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:12:27] Production.INFO: ==26275== Releasing lock... [2025-03-03 14:12:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:12:27] Production.INFO: 78 MB #Memory Used# [2025-03-03 14:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:13:05 [end_date_ymd] => 2025-03-03 14:13:05 [RateCDR] => 1 ) [2025-03-03 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-03 11:13:05' and `end` < '2025-03-03 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-03 14:13:19] Production.INFO: count ==6695 [2025-03-03 14:13:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:13:05 - End Time 2025-03-03 14:13:05 [2025-03-03 14:13:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:13:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599001', 'tblTempUsageDetail_20' ) start [2025-03-03 14:13:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599001', 'tblTempUsageDetail_20' ) end [2025-03-03 14:13:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599001', 'tblTempVendorCDR_20' ) start [2025-03-03 14:13:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599001', 'tblTempVendorCDR_20' ) end [2025-03-03 14:13:22] Production.INFO: ProcessCDR(1,14599001,1,1,2) [2025-03-03 14:13:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599001,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:13:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599001,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:13:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599001,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:13:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599001,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:13:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599001', 'tblTempUsageDetail_20' ) start [2025-03-03 14:13:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599001', 'tblTempUsageDetail_20' ) end [2025-03-03 14:13:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:13:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:13:27] Production.INFO: ==26348== Releasing lock... [2025-03-03 14:13:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:13:27] Production.INFO: 78.25 MB #Memory Used# [2025-03-03 14:14:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:14:05 [end_date_ymd] => 2025-03-03 14:14:05 [RateCDR] => 1 ) [2025-03-03 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-03 11:14:05' and `end` < '2025-03-03 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-03 14:14:19] Production.INFO: count ==6708 [2025-03-03 14:14:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:14:05 - End Time 2025-03-03 14:14:05 [2025-03-03 14:14:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:14:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599006', 'tblTempUsageDetail_20' ) start [2025-03-03 14:14:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599006', 'tblTempUsageDetail_20' ) end [2025-03-03 14:14:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599006', 'tblTempVendorCDR_20' ) start [2025-03-03 14:14:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599006', 'tblTempVendorCDR_20' ) end [2025-03-03 14:14:22] Production.INFO: ProcessCDR(1,14599006,1,1,2) [2025-03-03 14:14:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599006,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:14:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599006,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:14:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599006,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:14:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599006,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:14:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599006', 'tblTempUsageDetail_20' ) start [2025-03-03 14:14:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599006', 'tblTempUsageDetail_20' ) end [2025-03-03 14:14:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:14:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:14:27] Production.INFO: ==26422== Releasing lock... [2025-03-03 14:14:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:14:27] Production.INFO: 78.25 MB #Memory Used# [2025-03-03 14:15:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:15:05 [end_date_ymd] => 2025-03-03 14:15:05 [RateCDR] => 1 ) [2025-03-03 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-03 11:15:05' and `end` < '2025-03-03 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-03 14:15:19] Production.INFO: count ==6708 [2025-03-03 14:15:23] Production.ERROR: pbx CDR StartTime 2025-03-03 11:15:05 - End Time 2025-03-03 14:15:05 [2025-03-03 14:15:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:15:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599011', 'tblTempUsageDetail_20' ) start [2025-03-03 14:15:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599011', 'tblTempUsageDetail_20' ) end [2025-03-03 14:15:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599011', 'tblTempVendorCDR_20' ) start [2025-03-03 14:15:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599011', 'tblTempVendorCDR_20' ) end [2025-03-03 14:15:23] Production.INFO: ProcessCDR(1,14599011,1,1,2) [2025-03-03 14:15:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599011,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:15:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599011,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:15:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599011,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:15:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599011,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:15:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599011', 'tblTempUsageDetail_20' ) start [2025-03-03 14:15:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599011', 'tblTempUsageDetail_20' ) end [2025-03-03 14:15:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:15:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:15:28] Production.INFO: ==26496== Releasing lock... [2025-03-03 14:15:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:15:28] Production.INFO: 78.25 MB #Memory Used# [2025-03-03 14:16:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:16:06 [end_date_ymd] => 2025-03-03 14:16:06 [RateCDR] => 1 ) [2025-03-03 14:16:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 11:16:06' and `end` < '2025-03-03 14:16:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 14:16:19] Production.INFO: count ==6729 [2025-03-03 14:16:23] Production.ERROR: pbx CDR StartTime 2025-03-03 11:16:06 - End Time 2025-03-03 14:16:06 [2025-03-03 14:16:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:16:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599016', 'tblTempUsageDetail_20' ) start [2025-03-03 14:16:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599016', 'tblTempUsageDetail_20' ) end [2025-03-03 14:16:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599016', 'tblTempVendorCDR_20' ) start [2025-03-03 14:16:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599016', 'tblTempVendorCDR_20' ) end [2025-03-03 14:16:23] Production.INFO: ProcessCDR(1,14599016,1,1,2) [2025-03-03 14:16:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599016,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:16:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599016,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:16:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599016,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:16:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599016,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:16:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599016', 'tblTempUsageDetail_20' ) start [2025-03-03 14:16:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599016', 'tblTempUsageDetail_20' ) end [2025-03-03 14:16:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:16:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:16:28] Production.INFO: ==26607== Releasing lock... [2025-03-03 14:16:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:16:28] Production.INFO: 78.5 MB #Memory Used# [2025-03-03 14:17:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:17:06 [end_date_ymd] => 2025-03-03 14:17:06 [RateCDR] => 1 ) [2025-03-03 14: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-03 11:17:06' and `end` < '2025-03-03 14: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-03 14:17:19] Production.INFO: count ==6716 [2025-03-03 14:17:23] Production.ERROR: pbx CDR StartTime 2025-03-03 11:17:06 - End Time 2025-03-03 14:17:06 [2025-03-03 14:17:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:17:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599021', 'tblTempUsageDetail_20' ) start [2025-03-03 14:17:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599021', 'tblTempUsageDetail_20' ) end [2025-03-03 14:17:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599021', 'tblTempVendorCDR_20' ) start [2025-03-03 14:17:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599021', 'tblTempVendorCDR_20' ) end [2025-03-03 14:17:23] Production.INFO: ProcessCDR(1,14599021,1,1,2) [2025-03-03 14:17:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599021,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:17:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599021,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:17:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599021,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:17:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599021,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:17:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599021', 'tblTempUsageDetail_20' ) start [2025-03-03 14:17:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599021', 'tblTempUsageDetail_20' ) end [2025-03-03 14:17:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:17:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:17:28] Production.INFO: ==26683== Releasing lock... [2025-03-03 14:17:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:17:28] Production.INFO: 78.25 MB #Memory Used# [2025-03-03 14:18:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:18:06 [end_date_ymd] => 2025-03-03 14:18:06 [RateCDR] => 1 ) [2025-03-03 14:18:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 11:18:06' and `end` < '2025-03-03 14:18:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 14:18:20] Production.INFO: count ==6708 [2025-03-03 14:18:23] Production.ERROR: pbx CDR StartTime 2025-03-03 11:18:06 - End Time 2025-03-03 14:18:06 [2025-03-03 14:18:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:18:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599026', 'tblTempUsageDetail_20' ) start [2025-03-03 14:18:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599026', 'tblTempUsageDetail_20' ) end [2025-03-03 14:18:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599026', 'tblTempVendorCDR_20' ) start [2025-03-03 14:18:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599026', 'tblTempVendorCDR_20' ) end [2025-03-03 14:18:24] Production.INFO: ProcessCDR(1,14599026,1,1,2) [2025-03-03 14:18:24] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599026,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:18:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599026,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:18:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599026,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:18:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599026,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:18:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599026', 'tblTempUsageDetail_20' ) start [2025-03-03 14:18:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599026', 'tblTempUsageDetail_20' ) end [2025-03-03 14:18:29] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:18:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:18:29] Production.INFO: ==26757== Releasing lock... [2025-03-03 14:18:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:18:29] Production.INFO: 78.25 MB #Memory Used# [2025-03-03 14:19:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:19:05 [end_date_ymd] => 2025-03-03 14:19:05 [RateCDR] => 1 ) [2025-03-03 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-03 11:19:05' and `end` < '2025-03-03 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-03 14:19:18] Production.INFO: count ==6678 [2025-03-03 14:19:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:19:05 - End Time 2025-03-03 14:19:05 [2025-03-03 14:19:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:19:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599031', 'tblTempUsageDetail_20' ) start [2025-03-03 14:19:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599031', 'tblTempUsageDetail_20' ) end [2025-03-03 14:19:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599031', 'tblTempVendorCDR_20' ) start [2025-03-03 14:19:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599031', 'tblTempVendorCDR_20' ) end [2025-03-03 14:19:22] Production.INFO: ProcessCDR(1,14599031,1,1,2) [2025-03-03 14:19:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599031,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:19:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599031,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:19:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599031,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:19:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599031,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:19:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599031', 'tblTempUsageDetail_20' ) start [2025-03-03 14:19:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599031', 'tblTempUsageDetail_20' ) end [2025-03-03 14:19:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:19:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:19:27] Production.INFO: ==26827== Releasing lock... [2025-03-03 14:19:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:19:27] Production.INFO: 78 MB #Memory Used# [2025-03-03 14:20:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:20:06 [end_date_ymd] => 2025-03-03 14:20:06 [RateCDR] => 1 ) [2025-03-03 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-03 11:20:06' and `end` < '2025-03-03 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-03 14:20:19] Production.INFO: count ==6700 [2025-03-03 14:20:23] Production.ERROR: pbx CDR StartTime 2025-03-03 11:20:06 - End Time 2025-03-03 14:20:06 [2025-03-03 14:20:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:20:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599036', 'tblTempUsageDetail_20' ) start [2025-03-03 14:20:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599036', 'tblTempUsageDetail_20' ) end [2025-03-03 14:20:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599036', 'tblTempVendorCDR_20' ) start [2025-03-03 14:20:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599036', 'tblTempVendorCDR_20' ) end [2025-03-03 14:20:23] Production.INFO: ProcessCDR(1,14599036,1,1,2) [2025-03-03 14:20:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599036,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:20:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599036,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:20:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599036,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:20:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599036,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:20:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599036', 'tblTempUsageDetail_20' ) start [2025-03-03 14:20:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599036', 'tblTempUsageDetail_20' ) end [2025-03-03 14:20:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:20:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:20:28] Production.INFO: ==26907== Releasing lock... [2025-03-03 14:20:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:20:28] Production.INFO: 78.25 MB #Memory Used# [2025-03-03 14:21:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:21:06 [end_date_ymd] => 2025-03-03 14:21:06 [RateCDR] => 1 ) [2025-03-03 14:21:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 11:21:06' and `end` < '2025-03-03 14:21:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 14:21:19] Production.INFO: count ==6662 [2025-03-03 14:21:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:21:06 - End Time 2025-03-03 14:21:06 [2025-03-03 14:21:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:21:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599042', 'tblTempUsageDetail_20' ) start [2025-03-03 14:21:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599042', 'tblTempUsageDetail_20' ) end [2025-03-03 14:21:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599042', 'tblTempVendorCDR_20' ) start [2025-03-03 14:21:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599042', 'tblTempVendorCDR_20' ) end [2025-03-03 14:21:23] Production.INFO: ProcessCDR(1,14599042,1,1,2) [2025-03-03 14:21:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599042,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:21:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599042,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:21:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599042,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:21:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599042,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:21:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599042', 'tblTempUsageDetail_20' ) start [2025-03-03 14:21:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599042', 'tblTempUsageDetail_20' ) end [2025-03-03 14:21:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:21:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:21:28] Production.INFO: ==26982== Releasing lock... [2025-03-03 14:21:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:21:28] Production.INFO: 78 MB #Memory Used# [2025-03-03 14:22:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:22:06 [end_date_ymd] => 2025-03-03 14:22:06 [RateCDR] => 1 ) [2025-03-03 14:22:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 11:22:06' and `end` < '2025-03-03 14:22:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 14:22:19] Production.INFO: count ==6636 [2025-03-03 14:22:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:22:06 - End Time 2025-03-03 14:22:06 [2025-03-03 14:22:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:22:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599047', 'tblTempUsageDetail_20' ) start [2025-03-03 14:22:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599047', 'tblTempUsageDetail_20' ) end [2025-03-03 14:22:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599047', 'tblTempVendorCDR_20' ) start [2025-03-03 14:22:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599047', 'tblTempVendorCDR_20' ) end [2025-03-03 14:22:22] Production.INFO: ProcessCDR(1,14599047,1,1,2) [2025-03-03 14:22:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599047,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:22:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599047,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:22:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599047,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:22:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599047,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:22:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599047', 'tblTempUsageDetail_20' ) start [2025-03-03 14:22:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599047', 'tblTempUsageDetail_20' ) end [2025-03-03 14:22:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:22:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:22:27] Production.INFO: ==27056== Releasing lock... [2025-03-03 14:22:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:22:27] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 14:23:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:23:05 [end_date_ymd] => 2025-03-03 14:23:05 [RateCDR] => 1 ) [2025-03-03 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-03 11:23:05' and `end` < '2025-03-03 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-03 14:23:18] Production.INFO: count ==6635 [2025-03-03 14:23:21] Production.ERROR: pbx CDR StartTime 2025-03-03 11:23:05 - End Time 2025-03-03 14:23:05 [2025-03-03 14:23:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:23:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599052', 'tblTempUsageDetail_20' ) start [2025-03-03 14:23:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599052', 'tblTempUsageDetail_20' ) end [2025-03-03 14:23:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599052', 'tblTempVendorCDR_20' ) start [2025-03-03 14:23:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599052', 'tblTempVendorCDR_20' ) end [2025-03-03 14:23:22] Production.INFO: ProcessCDR(1,14599052,1,1,2) [2025-03-03 14:23:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599052,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:23:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599052,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:23:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599052,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:23:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599052,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:23:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599052', 'tblTempUsageDetail_20' ) start [2025-03-03 14:23:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599052', 'tblTempUsageDetail_20' ) end [2025-03-03 14:23:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:23:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:23:27] Production.INFO: ==27133== Releasing lock... [2025-03-03 14:23:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:23:27] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 14:24:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:24:05 [end_date_ymd] => 2025-03-03 14:24:05 [RateCDR] => 1 ) [2025-03-03 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-03 11:24:05' and `end` < '2025-03-03 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-03 14:24:19] Production.INFO: count ==6646 [2025-03-03 14:24:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:24:05 - End Time 2025-03-03 14:24:05 [2025-03-03 14:24:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:24:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599057', 'tblTempUsageDetail_20' ) start [2025-03-03 14:24:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599057', 'tblTempUsageDetail_20' ) end [2025-03-03 14:24:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599057', 'tblTempVendorCDR_20' ) start [2025-03-03 14:24:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599057', 'tblTempVendorCDR_20' ) end [2025-03-03 14:24:22] Production.INFO: ProcessCDR(1,14599057,1,1,2) [2025-03-03 14:24:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599057,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:24:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599057,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:24:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599057,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:24:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599057,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:24:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599057', 'tblTempUsageDetail_20' ) start [2025-03-03 14:24:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599057', 'tblTempUsageDetail_20' ) end [2025-03-03 14:24:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:24:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:24:27] Production.INFO: ==27209== Releasing lock... [2025-03-03 14:24:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:24:27] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 14:25:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:25:05 [end_date_ymd] => 2025-03-03 14:25:05 [RateCDR] => 1 ) [2025-03-03 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-03 11:25:05' and `end` < '2025-03-03 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-03 14:25:18] Production.INFO: count ==6627 [2025-03-03 14:25:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:25:05 - End Time 2025-03-03 14:25:05 [2025-03-03 14:25:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:25:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599062', 'tblTempUsageDetail_20' ) start [2025-03-03 14:25:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599062', 'tblTempUsageDetail_20' ) end [2025-03-03 14:25:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599062', 'tblTempVendorCDR_20' ) start [2025-03-03 14:25:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599062', 'tblTempVendorCDR_20' ) end [2025-03-03 14:25:22] Production.INFO: ProcessCDR(1,14599062,1,1,2) [2025-03-03 14:25:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599062,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:25:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599062,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:25:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599062,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:25:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599062,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:25:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599062', 'tblTempUsageDetail_20' ) start [2025-03-03 14:25:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599062', 'tblTempUsageDetail_20' ) end [2025-03-03 14:25:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:25:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:25:27] Production.INFO: ==27281== Releasing lock... [2025-03-03 14:25:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:25:27] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 14:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:26:05 [end_date_ymd] => 2025-03-03 14:26:05 [RateCDR] => 1 ) [2025-03-03 14:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 11:26:05' and `end` < '2025-03-03 14:26:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 14:26:19] Production.INFO: count ==6629 [2025-03-03 14:26:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:26:05 - End Time 2025-03-03 14:26:05 [2025-03-03 14:26:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:26:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599067', 'tblTempUsageDetail_20' ) start [2025-03-03 14:26:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599067', 'tblTempUsageDetail_20' ) end [2025-03-03 14:26:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599067', 'tblTempVendorCDR_20' ) start [2025-03-03 14:26:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599067', 'tblTempVendorCDR_20' ) end [2025-03-03 14:26:22] Production.INFO: ProcessCDR(1,14599067,1,1,2) [2025-03-03 14:26:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599067,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:26:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599067,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:26:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599067,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:26:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599067,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:26:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599067', 'tblTempUsageDetail_20' ) start [2025-03-03 14:26:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599067', 'tblTempUsageDetail_20' ) end [2025-03-03 14:26:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:26:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:26:28] Production.INFO: ==27357== Releasing lock... [2025-03-03 14:26:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:26:28] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 14:27:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:27:05 [end_date_ymd] => 2025-03-03 14:27:05 [RateCDR] => 1 ) [2025-03-03 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-03 11:27:05' and `end` < '2025-03-03 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-03 14:27:18] Production.INFO: count ==6629 [2025-03-03 14:27:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:27:05 - End Time 2025-03-03 14:27:05 [2025-03-03 14:27:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:27:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599072', 'tblTempUsageDetail_20' ) start [2025-03-03 14:27:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599072', 'tblTempUsageDetail_20' ) end [2025-03-03 14:27:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599072', 'tblTempVendorCDR_20' ) start [2025-03-03 14:27:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599072', 'tblTempVendorCDR_20' ) end [2025-03-03 14:27:22] Production.INFO: ProcessCDR(1,14599072,1,1,2) [2025-03-03 14:27:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599072,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:27:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599072,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:27:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599072,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:27:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599072,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:27:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599072', 'tblTempUsageDetail_20' ) start [2025-03-03 14:27:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599072', 'tblTempUsageDetail_20' ) end [2025-03-03 14:27:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:27:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:27:27] Production.INFO: ==27433== Releasing lock... [2025-03-03 14:27:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:27:27] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 14:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:28:05 [end_date_ymd] => 2025-03-03 14:28:05 [RateCDR] => 1 ) [2025-03-03 14:28:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 11:28:05' and `end` < '2025-03-03 14:28:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 14:28:19] Production.INFO: count ==6622 [2025-03-03 14:28:23] Production.ERROR: pbx CDR StartTime 2025-03-03 11:28:05 - End Time 2025-03-03 14:28:05 [2025-03-03 14:28:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:28:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599077', 'tblTempUsageDetail_20' ) start [2025-03-03 14:28:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599077', 'tblTempUsageDetail_20' ) end [2025-03-03 14:28:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599077', 'tblTempVendorCDR_20' ) start [2025-03-03 14:28:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599077', 'tblTempVendorCDR_20' ) end [2025-03-03 14:28:23] Production.INFO: ProcessCDR(1,14599077,1,1,2) [2025-03-03 14:28:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599077,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:28:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599077,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:28:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599077,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:28:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599077,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:28:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599077', 'tblTempUsageDetail_20' ) start [2025-03-03 14:28:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599077', 'tblTempUsageDetail_20' ) end [2025-03-03 14:28:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:28:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:28:28] Production.INFO: ==27508== Releasing lock... [2025-03-03 14:28:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:28:28] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 14:29:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:29:05 [end_date_ymd] => 2025-03-03 14:29:05 [RateCDR] => 1 ) [2025-03-03 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-03 11:29:05' and `end` < '2025-03-03 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-03 14:29:19] Production.INFO: count ==6599 [2025-03-03 14:29:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:29:05 - End Time 2025-03-03 14:29:05 [2025-03-03 14:29:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:29:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599082', 'tblTempUsageDetail_20' ) start [2025-03-03 14:29:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599082', 'tblTempUsageDetail_20' ) end [2025-03-03 14:29:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599082', 'tblTempVendorCDR_20' ) start [2025-03-03 14:29:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599082', 'tblTempVendorCDR_20' ) end [2025-03-03 14:29:22] Production.INFO: ProcessCDR(1,14599082,1,1,2) [2025-03-03 14:29:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599082,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:29:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599082,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:29:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599082,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:29:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599082,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:29:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599082', 'tblTempUsageDetail_20' ) start [2025-03-03 14:29:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599082', 'tblTempUsageDetail_20' ) end [2025-03-03 14:29:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:29:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:29:28] Production.INFO: ==27581== Releasing lock... [2025-03-03 14:29:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:29:28] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 14:30:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:30:07 [end_date_ymd] => 2025-03-03 14:30:07 [RateCDR] => 1 ) [2025-03-03 14: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-03 11:30:07' and `end` < '2025-03-03 14: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-03 14:30:20] Production.INFO: count ==6595 [2025-03-03 14:30:23] Production.ERROR: pbx CDR StartTime 2025-03-03 11:30:07 - End Time 2025-03-03 14:30:07 [2025-03-03 14:30:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:30:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599088', 'tblTempUsageDetail_20' ) start [2025-03-03 14:30:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599088', 'tblTempUsageDetail_20' ) end [2025-03-03 14:30:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599088', 'tblTempVendorCDR_20' ) start [2025-03-03 14:30:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599088', 'tblTempVendorCDR_20' ) end [2025-03-03 14:30:23] Production.INFO: ProcessCDR(1,14599088,1,1,2) [2025-03-03 14:30:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599088,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:30:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599088,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:30:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599088,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:30:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599088,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:30:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599088', 'tblTempUsageDetail_20' ) start [2025-03-03 14:30:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599088', 'tblTempUsageDetail_20' ) end [2025-03-03 14:30:29] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:30:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:30:29] Production.INFO: ==27657== Releasing lock... [2025-03-03 14:30:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:30:29] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 14:31:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:31:05 [end_date_ymd] => 2025-03-03 14:31:05 [RateCDR] => 1 ) [2025-03-03 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-03 11:31:05' and `end` < '2025-03-03 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-03 14:31:18] Production.INFO: count ==6597 [2025-03-03 14:31:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:31:05 - End Time 2025-03-03 14:31:05 [2025-03-03 14:31:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:31:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599093', 'tblTempUsageDetail_20' ) start [2025-03-03 14:31:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599093', 'tblTempUsageDetail_20' ) end [2025-03-03 14:31:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599093', 'tblTempVendorCDR_20' ) start [2025-03-03 14:31:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599093', 'tblTempVendorCDR_20' ) end [2025-03-03 14:31:23] Production.INFO: ProcessCDR(1,14599093,1,1,2) [2025-03-03 14:31:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599093,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:31:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599093,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:31:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599093,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:31:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599093,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:31:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599093', 'tblTempUsageDetail_20' ) start [2025-03-03 14:31:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599093', 'tblTempUsageDetail_20' ) end [2025-03-03 14:31:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:31:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:31:28] Production.INFO: ==27768== Releasing lock... [2025-03-03 14:31:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:31:28] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 14:32:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:32:05 [end_date_ymd] => 2025-03-03 14:32:05 [RateCDR] => 1 ) [2025-03-03 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-03 11:32:05' and `end` < '2025-03-03 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-03 14:32:18] Production.INFO: count ==6576 [2025-03-03 14:32:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:32:05 - End Time 2025-03-03 14:32:05 [2025-03-03 14:32:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:32:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599098', 'tblTempUsageDetail_20' ) start [2025-03-03 14:32:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599098', 'tblTempUsageDetail_20' ) end [2025-03-03 14:32:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599098', 'tblTempVendorCDR_20' ) start [2025-03-03 14:32:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599098', 'tblTempVendorCDR_20' ) end [2025-03-03 14:32:22] Production.INFO: ProcessCDR(1,14599098,1,1,2) [2025-03-03 14:32:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599098,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:32:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599098,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:32:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599098,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:32:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599098,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:32:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599098', 'tblTempUsageDetail_20' ) start [2025-03-03 14:32:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599098', 'tblTempUsageDetail_20' ) end [2025-03-03 14:32:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:32:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:32:28] Production.INFO: ==27845== Releasing lock... [2025-03-03 14:32:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:32:28] Production.INFO: 77.25 MB #Memory Used# [2025-03-03 14:33:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:33:05 [end_date_ymd] => 2025-03-03 14:33:05 [RateCDR] => 1 ) [2025-03-03 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-03 11:33:05' and `end` < '2025-03-03 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-03 14:33:18] Production.INFO: count ==6564 [2025-03-03 14:33:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:33:05 - End Time 2025-03-03 14:33:05 [2025-03-03 14:33:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:33:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599103', 'tblTempUsageDetail_20' ) start [2025-03-03 14:33:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599103', 'tblTempUsageDetail_20' ) end [2025-03-03 14:33:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599103', 'tblTempVendorCDR_20' ) start [2025-03-03 14:33:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599103', 'tblTempVendorCDR_20' ) end [2025-03-03 14:33:22] Production.INFO: ProcessCDR(1,14599103,1,1,2) [2025-03-03 14:33:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599103,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:33:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599103,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:33:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599103,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:33:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599103,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:33:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599103', 'tblTempUsageDetail_20' ) start [2025-03-03 14:33:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599103', 'tblTempUsageDetail_20' ) end [2025-03-03 14:33:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:33:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:33:28] Production.INFO: ==27924== Releasing lock... [2025-03-03 14:33:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:33:28] Production.INFO: 77.25 MB #Memory Used# [2025-03-03 14:34:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:34:06 [end_date_ymd] => 2025-03-03 14:34:06 [RateCDR] => 1 ) [2025-03-03 14:34:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 11:34:06' and `end` < '2025-03-03 14:34:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 14:34:19] Production.INFO: count ==6611 [2025-03-03 14:34:23] Production.ERROR: pbx CDR StartTime 2025-03-03 11:34:06 - End Time 2025-03-03 14:34:06 [2025-03-03 14:34:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:34:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599108', 'tblTempUsageDetail_20' ) start [2025-03-03 14:34:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599108', 'tblTempUsageDetail_20' ) end [2025-03-03 14:34:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599108', 'tblTempVendorCDR_20' ) start [2025-03-03 14:34:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599108', 'tblTempVendorCDR_20' ) end [2025-03-03 14:34:23] Production.INFO: ProcessCDR(1,14599108,1,1,2) [2025-03-03 14:34:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599108,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:34:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599108,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:34:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599108,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:34:29] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599108,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:34:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599108', 'tblTempUsageDetail_20' ) start [2025-03-03 14:34:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599108', 'tblTempUsageDetail_20' ) end [2025-03-03 14:34:29] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:34:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:34:29] Production.INFO: ==28001== Releasing lock... [2025-03-03 14:34:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:34:29] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 14:35:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:35:06 [end_date_ymd] => 2025-03-03 14:35:06 [RateCDR] => 1 ) [2025-03-03 14: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-03 11:35:06' and `end` < '2025-03-03 14: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-03 14:35:19] Production.INFO: count ==6631 [2025-03-03 14:35:23] Production.ERROR: pbx CDR StartTime 2025-03-03 11:35:06 - End Time 2025-03-03 14:35:06 [2025-03-03 14:35:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:35:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599113', 'tblTempUsageDetail_20' ) start [2025-03-03 14:35:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599113', 'tblTempUsageDetail_20' ) end [2025-03-03 14:35:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599113', 'tblTempVendorCDR_20' ) start [2025-03-03 14:35:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599113', 'tblTempVendorCDR_20' ) end [2025-03-03 14:35:23] Production.INFO: ProcessCDR(1,14599113,1,1,2) [2025-03-03 14:35:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599113,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:35:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599113,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:35:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599113,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:35:29] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599113,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:35:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599113', 'tblTempUsageDetail_20' ) start [2025-03-03 14:35:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599113', 'tblTempUsageDetail_20' ) end [2025-03-03 14:35:29] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:35:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:35:29] Production.INFO: ==28087== Releasing lock... [2025-03-03 14:35:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:35:29] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 14:36:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:36:06 [end_date_ymd] => 2025-03-03 14:36:06 [RateCDR] => 1 ) [2025-03-03 14:36:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 11:36:06' and `end` < '2025-03-03 14:36:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 14:36:19] Production.INFO: count ==6651 [2025-03-03 14:36:23] Production.ERROR: pbx CDR StartTime 2025-03-03 11:36:06 - End Time 2025-03-03 14:36:06 [2025-03-03 14:36:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:36:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599118', 'tblTempUsageDetail_20' ) start [2025-03-03 14:36:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599118', 'tblTempUsageDetail_20' ) end [2025-03-03 14:36:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599118', 'tblTempVendorCDR_20' ) start [2025-03-03 14:36:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599118', 'tblTempVendorCDR_20' ) end [2025-03-03 14:36:23] Production.INFO: ProcessCDR(1,14599118,1,1,2) [2025-03-03 14:36:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599118,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:36:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599118,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:36:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599118,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:36:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599118,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:36:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599118', 'tblTempUsageDetail_20' ) start [2025-03-03 14:36:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599118', 'tblTempUsageDetail_20' ) end [2025-03-03 14:36:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:36:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:36:27] Production.INFO: ==28166== Releasing lock... [2025-03-03 14:36:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:36:27] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 14:37:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:37:06 [end_date_ymd] => 2025-03-03 14:37:06 [RateCDR] => 1 ) [2025-03-03 14:37:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 11:37:06' and `end` < '2025-03-03 14:37:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 14:37:19] Production.INFO: count ==6660 [2025-03-03 14:37:23] Production.ERROR: pbx CDR StartTime 2025-03-03 11:37:06 - End Time 2025-03-03 14:37:06 [2025-03-03 14:37:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:37:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599123', 'tblTempUsageDetail_20' ) start [2025-03-03 14:37:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599123', 'tblTempUsageDetail_20' ) end [2025-03-03 14:37:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599123', 'tblTempVendorCDR_20' ) start [2025-03-03 14:37:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599123', 'tblTempVendorCDR_20' ) end [2025-03-03 14:37:23] Production.INFO: ProcessCDR(1,14599123,1,1,2) [2025-03-03 14:37:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599123,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:37:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599123,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:37:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599123,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:37:29] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599123,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:37:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599123', 'tblTempUsageDetail_20' ) start [2025-03-03 14:37:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599123', 'tblTempUsageDetail_20' ) end [2025-03-03 14:37:29] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:37:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:37:29] Production.INFO: ==28242== Releasing lock... [2025-03-03 14:37:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:37:29] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 14:38:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:38:06 [end_date_ymd] => 2025-03-03 14:38:06 [RateCDR] => 1 ) [2025-03-03 14:38:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 11:38:06' and `end` < '2025-03-03 14:38:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 14:38:20] Production.INFO: count ==6707 [2025-03-03 14:38:23] Production.ERROR: pbx CDR StartTime 2025-03-03 11:38:06 - End Time 2025-03-03 14:38:06 [2025-03-03 14:38:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:38:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599128', 'tblTempUsageDetail_20' ) start [2025-03-03 14:38:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599128', 'tblTempUsageDetail_20' ) end [2025-03-03 14:38:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599128', 'tblTempVendorCDR_20' ) start [2025-03-03 14:38:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599128', 'tblTempVendorCDR_20' ) end [2025-03-03 14:38:24] Production.INFO: ProcessCDR(1,14599128,1,1,2) [2025-03-03 14:38:24] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599128,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:38:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599128,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:38:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599128,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:38:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599128,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:38:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599128', 'tblTempUsageDetail_20' ) start [2025-03-03 14:38:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599128', 'tblTempUsageDetail_20' ) end [2025-03-03 14:38:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:38:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:38:27] Production.INFO: ==28321== Releasing lock... [2025-03-03 14:38:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:38:27] Production.INFO: 78.25 MB #Memory Used# [2025-03-03 14:39:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:39:05 [end_date_ymd] => 2025-03-03 14:39:05 [RateCDR] => 1 ) [2025-03-03 14:39:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 11:39:05' and `end` < '2025-03-03 14:39:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 14:39:19] Production.INFO: count ==6657 [2025-03-03 14:39:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:39:05 - End Time 2025-03-03 14:39:05 [2025-03-03 14:39:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:39:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599133', 'tblTempUsageDetail_20' ) start [2025-03-03 14:39:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599133', 'tblTempUsageDetail_20' ) end [2025-03-03 14:39:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599133', 'tblTempVendorCDR_20' ) start [2025-03-03 14:39:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599133', 'tblTempVendorCDR_20' ) end [2025-03-03 14:39:23] Production.INFO: ProcessCDR(1,14599133,1,1,2) [2025-03-03 14:39:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599133,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:39:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599133,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:39:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599133,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:39:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599133,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:39:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599133', 'tblTempUsageDetail_20' ) start [2025-03-03 14:39:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599133', 'tblTempUsageDetail_20' ) end [2025-03-03 14:39:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:39:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:39:28] Production.INFO: ==28394== Releasing lock... [2025-03-03 14:39:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:39:28] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 14:40:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:40:06 [end_date_ymd] => 2025-03-03 14:40:06 [RateCDR] => 1 ) [2025-03-03 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-03 11:40:06' and `end` < '2025-03-03 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-03 14:40:20] Production.INFO: count ==6632 [2025-03-03 14:40:23] Production.ERROR: pbx CDR StartTime 2025-03-03 11:40:06 - End Time 2025-03-03 14:40:06 [2025-03-03 14:40:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:40:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599139', 'tblTempUsageDetail_20' ) start [2025-03-03 14:40:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599139', 'tblTempUsageDetail_20' ) end [2025-03-03 14:40:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599139', 'tblTempVendorCDR_20' ) start [2025-03-03 14:40:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599139', 'tblTempVendorCDR_20' ) end [2025-03-03 14:40:23] Production.INFO: ProcessCDR(1,14599139,1,1,2) [2025-03-03 14:40:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599139,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:40:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599139,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:40:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599139,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:40:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599139,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:40:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599139', 'tblTempUsageDetail_20' ) start [2025-03-03 14:40:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599139', 'tblTempUsageDetail_20' ) end [2025-03-03 14:40:29] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:40:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:40:29] Production.INFO: ==28474== Releasing lock... [2025-03-03 14:40:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:40:29] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 14:41:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:41:05 [end_date_ymd] => 2025-03-03 14:41:05 [RateCDR] => 1 ) [2025-03-03 14:41:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 11:41:05' and `end` < '2025-03-03 14:41:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 14:41:18] Production.INFO: count ==6649 [2025-03-03 14:41:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:41:05 - End Time 2025-03-03 14:41:05 [2025-03-03 14:41:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:41:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599144', 'tblTempUsageDetail_20' ) start [2025-03-03 14:41:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599144', 'tblTempUsageDetail_20' ) end [2025-03-03 14:41:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599144', 'tblTempVendorCDR_20' ) start [2025-03-03 14:41:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599144', 'tblTempVendorCDR_20' ) end [2025-03-03 14:41:22] Production.INFO: ProcessCDR(1,14599144,1,1,2) [2025-03-03 14:41:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599144,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:41:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599144,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:41:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599144,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:41:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599144,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:41:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599144', 'tblTempUsageDetail_20' ) start [2025-03-03 14:41:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599144', 'tblTempUsageDetail_20' ) end [2025-03-03 14:41:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:41:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:41:28] Production.INFO: ==28553== Releasing lock... [2025-03-03 14:41:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:41:28] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 14:42:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:42:05 [end_date_ymd] => 2025-03-03 14:42:05 [RateCDR] => 1 ) [2025-03-03 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-03 11:42:05' and `end` < '2025-03-03 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-03 14:42:18] Production.INFO: count ==6643 [2025-03-03 14:42:21] Production.ERROR: pbx CDR StartTime 2025-03-03 11:42:05 - End Time 2025-03-03 14:42:05 [2025-03-03 14:42:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:42:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599149', 'tblTempUsageDetail_20' ) start [2025-03-03 14:42:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599149', 'tblTempUsageDetail_20' ) end [2025-03-03 14:42:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599149', 'tblTempVendorCDR_20' ) start [2025-03-03 14:42:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599149', 'tblTempVendorCDR_20' ) end [2025-03-03 14:42:22] Production.INFO: ProcessCDR(1,14599149,1,1,2) [2025-03-03 14:42:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599149,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:42:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599149,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:42:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599149,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:42:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599149,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:42:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599149', 'tblTempUsageDetail_20' ) start [2025-03-03 14:42:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599149', 'tblTempUsageDetail_20' ) end [2025-03-03 14:42:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:42:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:42:27] Production.INFO: ==28628== Releasing lock... [2025-03-03 14:42:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:42:27] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 14:43:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:43:05 [end_date_ymd] => 2025-03-03 14:43:05 [RateCDR] => 1 ) [2025-03-03 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-03 11:43:05' and `end` < '2025-03-03 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-03 14:43:19] Production.INFO: count ==6621 [2025-03-03 14:43:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:43:05 - End Time 2025-03-03 14:43:05 [2025-03-03 14:43:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:43:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599154', 'tblTempUsageDetail_20' ) start [2025-03-03 14:43:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599154', 'tblTempUsageDetail_20' ) end [2025-03-03 14:43:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599154', 'tblTempVendorCDR_20' ) start [2025-03-03 14:43:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599154', 'tblTempVendorCDR_20' ) end [2025-03-03 14:43:22] Production.INFO: ProcessCDR(1,14599154,1,1,2) [2025-03-03 14:43:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599154,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:43:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599154,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:43:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599154,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:43:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599154,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:43:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599154', 'tblTempUsageDetail_20' ) start [2025-03-03 14:43:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599154', 'tblTempUsageDetail_20' ) end [2025-03-03 14:43:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:43:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:43:27] Production.INFO: ==28711== Releasing lock... [2025-03-03 14:43:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:43:27] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 14:44:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:44:05 [end_date_ymd] => 2025-03-03 14:44:05 [RateCDR] => 1 ) [2025-03-03 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-03 11:44:05' and `end` < '2025-03-03 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-03 14:44:19] Production.INFO: count ==6600 [2025-03-03 14:44:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:44:05 - End Time 2025-03-03 14:44:05 [2025-03-03 14:44:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:44:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599159', 'tblTempUsageDetail_20' ) start [2025-03-03 14:44:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599159', 'tblTempUsageDetail_20' ) end [2025-03-03 14:44:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599159', 'tblTempVendorCDR_20' ) start [2025-03-03 14:44:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599159', 'tblTempVendorCDR_20' ) end [2025-03-03 14:44:22] Production.INFO: ProcessCDR(1,14599159,1,1,2) [2025-03-03 14:44:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599159,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:44:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599159,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:44:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599159,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:44:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599159,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:44:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599159', 'tblTempUsageDetail_20' ) start [2025-03-03 14:44:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599159', 'tblTempUsageDetail_20' ) end [2025-03-03 14:44:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:44:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:44:27] Production.INFO: ==28784== Releasing lock... [2025-03-03 14:44:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:44:27] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 14:45:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:45:05 [end_date_ymd] => 2025-03-03 14:45:05 [RateCDR] => 1 ) [2025-03-03 14:45:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 11:45:05' and `end` < '2025-03-03 14:45:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 14:45:20] Production.INFO: count ==6600 [2025-03-03 14:45:23] Production.ERROR: pbx CDR StartTime 2025-03-03 11:45:05 - End Time 2025-03-03 14:45:05 [2025-03-03 14:45:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:45:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599164', 'tblTempUsageDetail_20' ) start [2025-03-03 14:45:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599164', 'tblTempUsageDetail_20' ) end [2025-03-03 14:45:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599164', 'tblTempVendorCDR_20' ) start [2025-03-03 14:45:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599164', 'tblTempVendorCDR_20' ) end [2025-03-03 14:45:23] Production.INFO: ProcessCDR(1,14599164,1,1,2) [2025-03-03 14:45:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599164,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:45:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599164,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:45:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599164,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:45:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599164,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:45:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599164', 'tblTempUsageDetail_20' ) start [2025-03-03 14:45:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599164', 'tblTempUsageDetail_20' ) end [2025-03-03 14:45:29] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:45:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:45:29] Production.INFO: ==28863== Releasing lock... [2025-03-03 14:45:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:45:29] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 14:46:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:46:06 [end_date_ymd] => 2025-03-03 14:46:06 [RateCDR] => 1 ) [2025-03-03 14:46:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 11:46:06' and `end` < '2025-03-03 14:46:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 14:46:19] Production.INFO: count ==6609 [2025-03-03 14:46:23] Production.ERROR: pbx CDR StartTime 2025-03-03 11:46:06 - End Time 2025-03-03 14:46:06 [2025-03-03 14:46:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:46:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599169', 'tblTempUsageDetail_20' ) start [2025-03-03 14:46:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599169', 'tblTempUsageDetail_20' ) end [2025-03-03 14:46:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599169', 'tblTempVendorCDR_20' ) start [2025-03-03 14:46:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599169', 'tblTempVendorCDR_20' ) end [2025-03-03 14:46:23] Production.INFO: ProcessCDR(1,14599169,1,1,2) [2025-03-03 14:46:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599169,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:46:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599169,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:46:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599169,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:46:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599169,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:46:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599169', 'tblTempUsageDetail_20' ) start [2025-03-03 14:46:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599169', 'tblTempUsageDetail_20' ) end [2025-03-03 14:46:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:46:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:46:28] Production.INFO: ==28935== Releasing lock... [2025-03-03 14:46:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:46:28] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 14:47:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:47:05 [end_date_ymd] => 2025-03-03 14:47:05 [RateCDR] => 1 ) [2025-03-03 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-03 11:47:05' and `end` < '2025-03-03 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-03 14:47:19] Production.INFO: count ==6620 [2025-03-03 14:47:23] Production.ERROR: pbx CDR StartTime 2025-03-03 11:47:05 - End Time 2025-03-03 14:47:05 [2025-03-03 14:47:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:47:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599174', 'tblTempUsageDetail_20' ) start [2025-03-03 14:47:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599174', 'tblTempUsageDetail_20' ) end [2025-03-03 14:47:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599174', 'tblTempVendorCDR_20' ) start [2025-03-03 14:47:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599174', 'tblTempVendorCDR_20' ) end [2025-03-03 14:47:23] Production.INFO: ProcessCDR(1,14599174,1,1,2) [2025-03-03 14:47:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599174,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:47:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599174,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:47:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599174,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:47:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599174,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:47:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599174', 'tblTempUsageDetail_20' ) start [2025-03-03 14:47:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599174', 'tblTempUsageDetail_20' ) end [2025-03-03 14:47:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:47:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:47:28] Production.INFO: ==29047== Releasing lock... [2025-03-03 14:47:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:47:28] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 14:48:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:48:06 [end_date_ymd] => 2025-03-03 14:48:06 [RateCDR] => 1 ) [2025-03-03 14:48:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 11:48:06' and `end` < '2025-03-03 14:48:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 14:48:20] Production.INFO: count ==6601 [2025-03-03 14:48:24] Production.ERROR: pbx CDR StartTime 2025-03-03 11:48:06 - End Time 2025-03-03 14:48:06 [2025-03-03 14:48:24] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:48:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599179', 'tblTempUsageDetail_20' ) start [2025-03-03 14:48:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599179', 'tblTempUsageDetail_20' ) end [2025-03-03 14:48:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599179', 'tblTempVendorCDR_20' ) start [2025-03-03 14:48:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599179', 'tblTempVendorCDR_20' ) end [2025-03-03 14:48:24] Production.INFO: ProcessCDR(1,14599179,1,1,2) [2025-03-03 14:48:24] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599179,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:48:27] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599179,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:48:27] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599179,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:48:29] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599179,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:48:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599179', 'tblTempUsageDetail_20' ) start [2025-03-03 14:48:30] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599179', 'tblTempUsageDetail_20' ) end [2025-03-03 14:48:30] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:48:30] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:48:30] Production.INFO: ==29122== Releasing lock... [2025-03-03 14:48:30] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:48:30] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 14:49:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:49:06 [end_date_ymd] => 2025-03-03 14:49:06 [RateCDR] => 1 ) [2025-03-03 14:49:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 11:49:06' and `end` < '2025-03-03 14:49:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 14:49:19] Production.INFO: count ==6606 [2025-03-03 14:49:23] Production.ERROR: pbx CDR StartTime 2025-03-03 11:49:06 - End Time 2025-03-03 14:49:06 [2025-03-03 14:49:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:49:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599184', 'tblTempUsageDetail_20' ) start [2025-03-03 14:49:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599184', 'tblTempUsageDetail_20' ) end [2025-03-03 14:49:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599184', 'tblTempVendorCDR_20' ) start [2025-03-03 14:49:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599184', 'tblTempVendorCDR_20' ) end [2025-03-03 14:49:23] Production.INFO: ProcessCDR(1,14599184,1,1,2) [2025-03-03 14:49:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599184,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:49:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599184,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:49:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599184,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:49:29] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599184,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:49:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599184', 'tblTempUsageDetail_20' ) start [2025-03-03 14:49:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599184', 'tblTempUsageDetail_20' ) end [2025-03-03 14:49:29] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:49:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:49:29] Production.INFO: ==29200== Releasing lock... [2025-03-03 14:49:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:49:29] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 14:50:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:50:07 [end_date_ymd] => 2025-03-03 14:50:07 [RateCDR] => 1 ) [2025-03-03 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-03 11:50:07' and `end` < '2025-03-03 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-03 14:50:21] Production.INFO: count ==6625 [2025-03-03 14:50:25] Production.ERROR: pbx CDR StartTime 2025-03-03 11:50:07 - End Time 2025-03-03 14:50:07 [2025-03-03 14:50:25] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:50:25] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599190', 'tblTempUsageDetail_20' ) start [2025-03-03 14:50:25] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599190', 'tblTempUsageDetail_20' ) end [2025-03-03 14:50:25] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599190', 'tblTempVendorCDR_20' ) start [2025-03-03 14:50:25] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599190', 'tblTempVendorCDR_20' ) end [2025-03-03 14:50:25] Production.INFO: ProcessCDR(1,14599190,1,1,2) [2025-03-03 14:50:25] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599190,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:50:27] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599190,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:50:27] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599190,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:50:30] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599190,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:50:30] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599190', 'tblTempUsageDetail_20' ) start [2025-03-03 14:50:30] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599190', 'tblTempUsageDetail_20' ) end [2025-03-03 14:50:30] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:50:31] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:50:31] Production.INFO: ==29278== Releasing lock... [2025-03-03 14:50:31] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:50:31] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 14:51:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:51:05 [end_date_ymd] => 2025-03-03 14:51:05 [RateCDR] => 1 ) [2025-03-03 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-03 11:51:05' and `end` < '2025-03-03 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-03 14:51:21] Production.INFO: count ==6642 [2025-03-03 14:51:25] Production.ERROR: pbx CDR StartTime 2025-03-03 11:51:05 - End Time 2025-03-03 14:51:05 [2025-03-03 14:51:25] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:51:25] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599195', 'tblTempUsageDetail_20' ) start [2025-03-03 14:51:25] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599195', 'tblTempUsageDetail_20' ) end [2025-03-03 14:51:25] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599195', 'tblTempVendorCDR_20' ) start [2025-03-03 14:51:25] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599195', 'tblTempVendorCDR_20' ) end [2025-03-03 14:51:25] Production.INFO: ProcessCDR(1,14599195,1,1,2) [2025-03-03 14:51:25] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599195,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:51:28] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599195,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:51:28] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599195,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:51:30] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599195,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:51:30] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599195', 'tblTempUsageDetail_20' ) start [2025-03-03 14:51:31] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599195', 'tblTempUsageDetail_20' ) end [2025-03-03 14:51:31] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:51:31] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:51:31] Production.INFO: ==29355== Releasing lock... [2025-03-03 14:51:31] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:51:31] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 14:52:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:52:06 [end_date_ymd] => 2025-03-03 14:52:06 [RateCDR] => 1 ) [2025-03-03 14:52:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 11:52:06' and `end` < '2025-03-03 14:52:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 14:52:19] Production.INFO: count ==6620 [2025-03-03 14:52:23] Production.ERROR: pbx CDR StartTime 2025-03-03 11:52:06 - End Time 2025-03-03 14:52:06 [2025-03-03 14:52:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:52:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599200', 'tblTempUsageDetail_20' ) start [2025-03-03 14:52:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599200', 'tblTempUsageDetail_20' ) end [2025-03-03 14:52:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599200', 'tblTempVendorCDR_20' ) start [2025-03-03 14:52:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599200', 'tblTempVendorCDR_20' ) end [2025-03-03 14:52:23] Production.INFO: ProcessCDR(1,14599200,1,1,2) [2025-03-03 14:52:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599200,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:52:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599200,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:52:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599200,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:52:29] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599200,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:52:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599200', 'tblTempUsageDetail_20' ) start [2025-03-03 14:52:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599200', 'tblTempUsageDetail_20' ) end [2025-03-03 14:52:29] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:52:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:52:29] Production.INFO: ==29432== Releasing lock... [2025-03-03 14:52:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:52:29] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 14:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:53:05 [end_date_ymd] => 2025-03-03 14:53:05 [RateCDR] => 1 ) [2025-03-03 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-03 11:53:05' and `end` < '2025-03-03 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-03 14:53:19] Production.INFO: count ==6621 [2025-03-03 14:53:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:53:05 - End Time 2025-03-03 14:53:05 [2025-03-03 14:53:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:53:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599205', 'tblTempUsageDetail_20' ) start [2025-03-03 14:53:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599205', 'tblTempUsageDetail_20' ) end [2025-03-03 14:53:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599205', 'tblTempVendorCDR_20' ) start [2025-03-03 14:53:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599205', 'tblTempVendorCDR_20' ) end [2025-03-03 14:53:23] Production.INFO: ProcessCDR(1,14599205,1,1,2) [2025-03-03 14:53:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599205,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:53:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599205,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:53:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599205,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:53:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599205,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:53:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599205', 'tblTempUsageDetail_20' ) start [2025-03-03 14:53:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599205', 'tblTempUsageDetail_20' ) end [2025-03-03 14:53:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:53:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:53:28] Production.INFO: ==29504== Releasing lock... [2025-03-03 14:53:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:53:28] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 14:54:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:54:05 [end_date_ymd] => 2025-03-03 14:54:05 [RateCDR] => 1 ) [2025-03-03 14:54:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 11:54:05' and `end` < '2025-03-03 14:54:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 14:54:19] Production.INFO: count ==6609 [2025-03-03 14:54:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:54:05 - End Time 2025-03-03 14:54:05 [2025-03-03 14:54:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:54:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599210', 'tblTempUsageDetail_20' ) start [2025-03-03 14:54:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599210', 'tblTempUsageDetail_20' ) end [2025-03-03 14:54:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599210', 'tblTempVendorCDR_20' ) start [2025-03-03 14:54:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599210', 'tblTempVendorCDR_20' ) end [2025-03-03 14:54:23] Production.INFO: ProcessCDR(1,14599210,1,1,2) [2025-03-03 14:54:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599210,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:54:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599210,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:54:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599210,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:54:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599210,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:54:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599210', 'tblTempUsageDetail_20' ) start [2025-03-03 14:54:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599210', 'tblTempUsageDetail_20' ) end [2025-03-03 14:54:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:54:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:54:28] Production.INFO: ==29580== Releasing lock... [2025-03-03 14:54:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:54:28] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 14:55:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:55:05 [end_date_ymd] => 2025-03-03 14:55:05 [RateCDR] => 1 ) [2025-03-03 14: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-03 11:55:05' and `end` < '2025-03-03 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-03 14:55:19] Production.INFO: count ==6573 [2025-03-03 14:55:23] Production.ERROR: pbx CDR StartTime 2025-03-03 11:55:05 - End Time 2025-03-03 14:55:05 [2025-03-03 14:55:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:55:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599215', 'tblTempUsageDetail_20' ) start [2025-03-03 14:55:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599215', 'tblTempUsageDetail_20' ) end [2025-03-03 14:55:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599215', 'tblTempVendorCDR_20' ) start [2025-03-03 14:55:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599215', 'tblTempVendorCDR_20' ) end [2025-03-03 14:55:23] Production.INFO: ProcessCDR(1,14599215,1,1,2) [2025-03-03 14:55:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599215,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:55:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599215,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:55:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599215,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:55:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599215,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:55:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599215', 'tblTempUsageDetail_20' ) start [2025-03-03 14:55:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599215', 'tblTempUsageDetail_20' ) end [2025-03-03 14:55:29] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:55:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:55:29] Production.INFO: ==29657== Releasing lock... [2025-03-03 14:55:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:55:29] Production.INFO: 77.25 MB #Memory Used# [2025-03-03 14:56:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:56:05 [end_date_ymd] => 2025-03-03 14:56:05 [RateCDR] => 1 ) [2025-03-03 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-03 11:56:05' and `end` < '2025-03-03 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-03 14:56:19] Production.INFO: count ==6559 [2025-03-03 14:56:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:56:05 - End Time 2025-03-03 14:56:05 [2025-03-03 14:56:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:56:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599220', 'tblTempUsageDetail_20' ) start [2025-03-03 14:56:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599220', 'tblTempUsageDetail_20' ) end [2025-03-03 14:56:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599220', 'tblTempVendorCDR_20' ) start [2025-03-03 14:56:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599220', 'tblTempVendorCDR_20' ) end [2025-03-03 14:56:23] Production.INFO: ProcessCDR(1,14599220,1,1,2) [2025-03-03 14:56:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599220,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:56:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599220,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:56:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599220,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:56:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599220,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:56:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599220', 'tblTempUsageDetail_20' ) start [2025-03-03 14:56:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599220', 'tblTempUsageDetail_20' ) end [2025-03-03 14:56:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:56:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:56:28] Production.INFO: ==29732== Releasing lock... [2025-03-03 14:56:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:56:28] Production.INFO: 77 MB #Memory Used# [2025-03-03 14:57:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:57:05 [end_date_ymd] => 2025-03-03 14:57:05 [RateCDR] => 1 ) [2025-03-03 14:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 11:57:05' and `end` < '2025-03-03 14:57:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 14:57:19] Production.INFO: count ==6526 [2025-03-03 14:57:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:57:05 - End Time 2025-03-03 14:57:05 [2025-03-03 14:57:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:57:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599225', 'tblTempUsageDetail_20' ) start [2025-03-03 14:57:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599225', 'tblTempUsageDetail_20' ) end [2025-03-03 14:57:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599225', 'tblTempVendorCDR_20' ) start [2025-03-03 14:57:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599225', 'tblTempVendorCDR_20' ) end [2025-03-03 14:57:22] Production.INFO: ProcessCDR(1,14599225,1,1,2) [2025-03-03 14:57:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599225,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:57:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599225,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:57:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599225,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:57:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599225,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:57:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599225', 'tblTempUsageDetail_20' ) start [2025-03-03 14:57:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599225', 'tblTempUsageDetail_20' ) end [2025-03-03 14:57:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:57:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:57:28] Production.INFO: ==29809== Releasing lock... [2025-03-03 14:57:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:57:28] Production.INFO: 76.75 MB #Memory Used# [2025-03-03 14:58:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:58:06 [end_date_ymd] => 2025-03-03 14:58:06 [RateCDR] => 1 ) [2025-03-03 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-03 11:58:06' and `end` < '2025-03-03 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-03 14:58:20] Production.INFO: count ==6655 [2025-03-03 14:58:23] Production.ERROR: pbx CDR StartTime 2025-03-03 11:58:06 - End Time 2025-03-03 14:58:06 [2025-03-03 14:58:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:58:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599230', 'tblTempUsageDetail_20' ) start [2025-03-03 14:58:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599230', 'tblTempUsageDetail_20' ) end [2025-03-03 14:58:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599230', 'tblTempVendorCDR_20' ) start [2025-03-03 14:58:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599230', 'tblTempVendorCDR_20' ) end [2025-03-03 14:58:23] Production.INFO: ProcessCDR(1,14599230,1,1,2) [2025-03-03 14:58:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599230,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:58:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599230,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:58:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599230,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:58:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599230,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:58:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599230', 'tblTempUsageDetail_20' ) start [2025-03-03 14:58:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599230', 'tblTempUsageDetail_20' ) end [2025-03-03 14:58:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:58:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:58:27] Production.INFO: ==29886== Releasing lock... [2025-03-03 14:58:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:58:27] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 14:59:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 11:59:05 [end_date_ymd] => 2025-03-03 14:59:05 [RateCDR] => 1 ) [2025-03-03 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-03 11:59:05' and `end` < '2025-03-03 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-03 14:59:19] Production.INFO: count ==6845 [2025-03-03 14:59:22] Production.ERROR: pbx CDR StartTime 2025-03-03 11:59:05 - End Time 2025-03-03 14:59:05 [2025-03-03 14:59:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 14:59:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599235', 'tblTempUsageDetail_20' ) start [2025-03-03 14:59:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599235', 'tblTempUsageDetail_20' ) end [2025-03-03 14:59:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599235', 'tblTempVendorCDR_20' ) start [2025-03-03 14:59:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599235', 'tblTempVendorCDR_20' ) end [2025-03-03 14:59:22] Production.INFO: ProcessCDR(1,14599235,1,1,2) [2025-03-03 14:59:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599235,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:59:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599235,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 14:59:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599235,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:59:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599235,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 14:59:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599235', 'tblTempUsageDetail_20' ) start [2025-03-03 14:59:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599235', 'tblTempUsageDetail_20' ) end [2025-03-03 14:59:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 14:59:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 14:59:28] Production.INFO: ==29957== Releasing lock... [2025-03-03 14:59:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 14:59:28] Production.INFO: 79.25 MB #Memory Used# [2025-03-03 15:00:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:00:06 [end_date_ymd] => 2025-03-03 15:00:06 [RateCDR] => 1 ) [2025-03-03 15:00:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 12:00:06' and `end` < '2025-03-03 15:00:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 15:00:20] Production.INFO: count ==6862 [2025-03-03 15:00:24] Production.ERROR: pbx CDR StartTime 2025-03-03 12:00:06 - End Time 2025-03-03 15:00:06 [2025-03-03 15:00:24] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:00:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599241', 'tblTempUsageDetail_20' ) start [2025-03-03 15:00:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599241', 'tblTempUsageDetail_20' ) end [2025-03-03 15:00:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599241', 'tblTempVendorCDR_20' ) start [2025-03-03 15:00:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599241', 'tblTempVendorCDR_20' ) end [2025-03-03 15:00:24] Production.INFO: ProcessCDR(1,14599241,1,1,2) [2025-03-03 15:00:24] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599241,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:00:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599241,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:00:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599241,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:00:29] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599241,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:00:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599241', 'tblTempUsageDetail_20' ) start [2025-03-03 15:00:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599241', 'tblTempUsageDetail_20' ) end [2025-03-03 15:00:29] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:00:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:00:29] Production.INFO: ==30033== Releasing lock... [2025-03-03 15:00:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:00:29] Production.INFO: 79.25 MB #Memory Used# [2025-03-03 15:01:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:01:06 [end_date_ymd] => 2025-03-03 15:01:06 [RateCDR] => 1 ) [2025-03-03 15: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-03 12:01:06' and `end` < '2025-03-03 15: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-03 15:01:20] Production.INFO: count ==6905 [2025-03-03 15:01:23] Production.ERROR: pbx CDR StartTime 2025-03-03 12:01:06 - End Time 2025-03-03 15:01:06 [2025-03-03 15:01:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:01:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599246', 'tblTempUsageDetail_20' ) start [2025-03-03 15:01:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599246', 'tblTempUsageDetail_20' ) end [2025-03-03 15:01:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599246', 'tblTempVendorCDR_20' ) start [2025-03-03 15:01:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599246', 'tblTempVendorCDR_20' ) end [2025-03-03 15:01:23] Production.INFO: ProcessCDR(1,14599246,1,1,2) [2025-03-03 15:01:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599246,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:01:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599246,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:01:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599246,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:01:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599246,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:01:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599246', 'tblTempUsageDetail_20' ) start [2025-03-03 15:01:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599246', 'tblTempUsageDetail_20' ) end [2025-03-03 15:01:29] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:01:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:01:29] Production.INFO: ==30119== Releasing lock... [2025-03-03 15:01:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:01:29] Production.INFO: 79.75 MB #Memory Used# [2025-03-03 15:02:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:02:06 [end_date_ymd] => 2025-03-03 15:02:06 [RateCDR] => 1 ) [2025-03-03 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-03 12:02:06' and `end` < '2025-03-03 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-03 15:02:19] Production.INFO: count ==6836 [2025-03-03 15:02:23] Production.ERROR: pbx CDR StartTime 2025-03-03 12:02:06 - End Time 2025-03-03 15:02:06 [2025-03-03 15:02:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:02:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599251', 'tblTempUsageDetail_20' ) start [2025-03-03 15:02:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599251', 'tblTempUsageDetail_20' ) end [2025-03-03 15:02:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599251', 'tblTempVendorCDR_20' ) start [2025-03-03 15:02:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599251', 'tblTempVendorCDR_20' ) end [2025-03-03 15:02:23] Production.INFO: ProcessCDR(1,14599251,1,1,2) [2025-03-03 15:02:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599251,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:02:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599251,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:02:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599251,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:02:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599251,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:02:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599251', 'tblTempUsageDetail_20' ) start [2025-03-03 15:02:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599251', 'tblTempUsageDetail_20' ) end [2025-03-03 15:02:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:02:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:02:28] Production.INFO: ==30308== Releasing lock... [2025-03-03 15:02:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:02:28] Production.INFO: 79.25 MB #Memory Used# [2025-03-03 15:03:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:03:06 [end_date_ymd] => 2025-03-03 15:03:06 [RateCDR] => 1 ) [2025-03-03 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-03 12:03:06' and `end` < '2025-03-03 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-03 15:03:19] Production.INFO: count ==6791 [2025-03-03 15:03:23] Production.ERROR: pbx CDR StartTime 2025-03-03 12:03:06 - End Time 2025-03-03 15:03:06 [2025-03-03 15:03:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:03:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599256', 'tblTempUsageDetail_20' ) start [2025-03-03 15:03:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599256', 'tblTempUsageDetail_20' ) end [2025-03-03 15:03:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599256', 'tblTempVendorCDR_20' ) start [2025-03-03 15:03:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599256', 'tblTempVendorCDR_20' ) end [2025-03-03 15:03:23] Production.INFO: ProcessCDR(1,14599256,1,1,2) [2025-03-03 15:03:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599256,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:03:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599256,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:03:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599256,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:03:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599256,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:03:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599256', 'tblTempUsageDetail_20' ) start [2025-03-03 15:03:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599256', 'tblTempUsageDetail_20' ) end [2025-03-03 15:03:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:03:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:03:28] Production.INFO: ==30380== Releasing lock... [2025-03-03 15:03:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:03:28] Production.INFO: 78.75 MB #Memory Used# [2025-03-03 15:04:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:04:06 [end_date_ymd] => 2025-03-03 15:04:06 [RateCDR] => 1 ) [2025-03-03 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-03 12:04:06' and `end` < '2025-03-03 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-03 15:04:19] Production.INFO: count ==6775 [2025-03-03 15:04:23] Production.ERROR: pbx CDR StartTime 2025-03-03 12:04:06 - End Time 2025-03-03 15:04:06 [2025-03-03 15:04:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:04:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599261', 'tblTempUsageDetail_20' ) start [2025-03-03 15:04:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599261', 'tblTempUsageDetail_20' ) end [2025-03-03 15:04:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599261', 'tblTempVendorCDR_20' ) start [2025-03-03 15:04:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599261', 'tblTempVendorCDR_20' ) end [2025-03-03 15:04:23] Production.INFO: ProcessCDR(1,14599261,1,1,2) [2025-03-03 15:04:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599261,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:04:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599261,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:04:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599261,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:04:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599261,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:04:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599261', 'tblTempUsageDetail_20' ) start [2025-03-03 15:04:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599261', 'tblTempUsageDetail_20' ) end [2025-03-03 15:04:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:04:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:04:28] Production.INFO: ==30474== Releasing lock... [2025-03-03 15:04:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:04:28] Production.INFO: 78.75 MB #Memory Used# [2025-03-03 15:05:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:05:06 [end_date_ymd] => 2025-03-03 15:05:06 [RateCDR] => 1 ) [2025-03-03 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-03 12:05:06' and `end` < '2025-03-03 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-03 15:05:19] Production.INFO: count ==6743 [2025-03-03 15:05:23] Production.ERROR: pbx CDR StartTime 2025-03-03 12:05:06 - End Time 2025-03-03 15:05:06 [2025-03-03 15:05:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:05:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599266', 'tblTempUsageDetail_20' ) start [2025-03-03 15:05:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599266', 'tblTempUsageDetail_20' ) end [2025-03-03 15:05:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599266', 'tblTempVendorCDR_20' ) start [2025-03-03 15:05:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599266', 'tblTempVendorCDR_20' ) end [2025-03-03 15:05:23] Production.INFO: ProcessCDR(1,14599266,1,1,2) [2025-03-03 15:05:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599266,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:05:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599266,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:05:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599266,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:05:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599266,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:05:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599266', 'tblTempUsageDetail_20' ) start [2025-03-03 15:05:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599266', 'tblTempUsageDetail_20' ) end [2025-03-03 15:05:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:05:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:05:28] Production.INFO: ==30624== Releasing lock... [2025-03-03 15:05:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:05:28] Production.INFO: 78.5 MB #Memory Used# [2025-03-03 15:06:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:06:06 [end_date_ymd] => 2025-03-03 15:06:06 [RateCDR] => 1 ) [2025-03-03 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-03 12:06:06' and `end` < '2025-03-03 15:06:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 15:06:19] Production.INFO: count ==6735 [2025-03-03 15:06:23] Production.ERROR: pbx CDR StartTime 2025-03-03 12:06:06 - End Time 2025-03-03 15:06:06 [2025-03-03 15:06:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:06:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599271', 'tblTempUsageDetail_20' ) start [2025-03-03 15:06:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599271', 'tblTempUsageDetail_20' ) end [2025-03-03 15:06:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599271', 'tblTempVendorCDR_20' ) start [2025-03-03 15:06:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599271', 'tblTempVendorCDR_20' ) end [2025-03-03 15:06:23] Production.INFO: ProcessCDR(1,14599271,1,1,2) [2025-03-03 15:06:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599271,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:06:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599271,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:06:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599271,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:06:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599271,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:06:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599271', 'tblTempUsageDetail_20' ) start [2025-03-03 15:06:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599271', 'tblTempUsageDetail_20' ) end [2025-03-03 15:06:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:06:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:06:28] Production.INFO: ==30697== Releasing lock... [2025-03-03 15:06:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:06:28] Production.INFO: 78.5 MB #Memory Used# [2025-03-03 15:07:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:07:06 [end_date_ymd] => 2025-03-03 15:07:06 [RateCDR] => 1 ) [2025-03-03 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-03 12:07:06' and `end` < '2025-03-03 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-03 15:07:20] Production.INFO: count ==6719 [2025-03-03 15:07:23] Production.ERROR: pbx CDR StartTime 2025-03-03 12:07:06 - End Time 2025-03-03 15:07:06 [2025-03-03 15:07:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:07:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599276', 'tblTempUsageDetail_20' ) start [2025-03-03 15:07:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599276', 'tblTempUsageDetail_20' ) end [2025-03-03 15:07:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599276', 'tblTempVendorCDR_20' ) start [2025-03-03 15:07:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599276', 'tblTempVendorCDR_20' ) end [2025-03-03 15:07:23] Production.INFO: ProcessCDR(1,14599276,1,1,2) [2025-03-03 15:07:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599276,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:07:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599276,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:07:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599276,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:07:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599276,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:07:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599276', 'tblTempUsageDetail_20' ) start [2025-03-03 15:07:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599276', 'tblTempUsageDetail_20' ) end [2025-03-03 15:07:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:07:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:07:28] Production.INFO: ==30769== Releasing lock... [2025-03-03 15:07:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:07:28] Production.INFO: 78.25 MB #Memory Used# [2025-03-03 15:08:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:08:05 [end_date_ymd] => 2025-03-03 15:08:05 [RateCDR] => 1 ) [2025-03-03 15:08:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 12:08:05' and `end` < '2025-03-03 15:08:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 15:08:19] Production.INFO: count ==6711 [2025-03-03 15:08:23] Production.ERROR: pbx CDR StartTime 2025-03-03 12:08:05 - End Time 2025-03-03 15:08:05 [2025-03-03 15:08:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:08:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599281', 'tblTempUsageDetail_20' ) start [2025-03-03 15:08:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599281', 'tblTempUsageDetail_20' ) end [2025-03-03 15:08:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599281', 'tblTempVendorCDR_20' ) start [2025-03-03 15:08:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599281', 'tblTempVendorCDR_20' ) end [2025-03-03 15:08:23] Production.INFO: ProcessCDR(1,14599281,1,1,2) [2025-03-03 15:08:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599281,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:08:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599281,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:08:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599281,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:08:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599281,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:08:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599281', 'tblTempUsageDetail_20' ) start [2025-03-03 15:08:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599281', 'tblTempUsageDetail_20' ) end [2025-03-03 15:08:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:08:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:08:28] Production.INFO: ==30901== Releasing lock... [2025-03-03 15:08:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:08:28] Production.INFO: 78.25 MB #Memory Used# [2025-03-03 15:09:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:09:05 [end_date_ymd] => 2025-03-03 15:09:05 [RateCDR] => 1 ) [2025-03-03 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-03 12:09:05' and `end` < '2025-03-03 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-03 15:09:18] Production.INFO: count ==6711 [2025-03-03 15:09:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:09:05 - End Time 2025-03-03 15:09:05 [2025-03-03 15:09:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:09:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599286', 'tblTempUsageDetail_20' ) start [2025-03-03 15:09:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599286', 'tblTempUsageDetail_20' ) end [2025-03-03 15:09:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599286', 'tblTempVendorCDR_20' ) start [2025-03-03 15:09:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599286', 'tblTempVendorCDR_20' ) end [2025-03-03 15:09:22] Production.INFO: ProcessCDR(1,14599286,1,1,2) [2025-03-03 15:09:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599286,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:09:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599286,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:09:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599286,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:09:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599286,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:09:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599286', 'tblTempUsageDetail_20' ) start [2025-03-03 15:09:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599286', 'tblTempUsageDetail_20' ) end [2025-03-03 15:09:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:09:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:09:27] Production.INFO: ==30990== Releasing lock... [2025-03-03 15:09:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:09:27] Production.INFO: 78.25 MB #Memory Used# [2025-03-03 15:10:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:10:06 [end_date_ymd] => 2025-03-03 15:10:06 [RateCDR] => 1 ) [2025-03-03 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-03 12:10:06' and `end` < '2025-03-03 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-03 15:10:20] Production.INFO: count ==6733 [2025-03-03 15:10:23] Production.ERROR: pbx CDR StartTime 2025-03-03 12:10:06 - End Time 2025-03-03 15:10:06 [2025-03-03 15:10:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:10:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599292', 'tblTempUsageDetail_20' ) start [2025-03-03 15:10:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599292', 'tblTempUsageDetail_20' ) end [2025-03-03 15:10:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599292', 'tblTempVendorCDR_20' ) start [2025-03-03 15:10:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599292', 'tblTempVendorCDR_20' ) end [2025-03-03 15:10:23] Production.INFO: ProcessCDR(1,14599292,1,1,2) [2025-03-03 15:10:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599292,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:10:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599292,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:10:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599292,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:10:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599292,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:10:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599292', 'tblTempUsageDetail_20' ) start [2025-03-03 15:10:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599292', 'tblTempUsageDetail_20' ) end [2025-03-03 15:10:29] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:10:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:10:29] Production.INFO: ==31066== Releasing lock... [2025-03-03 15:10:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:10:29] Production.INFO: 78.5 MB #Memory Used# [2025-03-03 15:11:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:11:05 [end_date_ymd] => 2025-03-03 15:11:05 [RateCDR] => 1 ) [2025-03-03 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-03 12:11:05' and `end` < '2025-03-03 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-03 15:11:18] Production.INFO: count ==6726 [2025-03-03 15:11:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:11:05 - End Time 2025-03-03 15:11:05 [2025-03-03 15:11:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:11:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599297', 'tblTempUsageDetail_20' ) start [2025-03-03 15:11:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599297', 'tblTempUsageDetail_20' ) end [2025-03-03 15:11:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599297', 'tblTempVendorCDR_20' ) start [2025-03-03 15:11:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599297', 'tblTempVendorCDR_20' ) end [2025-03-03 15:11:22] Production.INFO: ProcessCDR(1,14599297,1,1,2) [2025-03-03 15:11:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599297,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:11:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599297,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:11:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599297,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:11:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599297,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:11:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599297', 'tblTempUsageDetail_20' ) start [2025-03-03 15:11:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599297', 'tblTempUsageDetail_20' ) end [2025-03-03 15:11:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:11:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:11:27] Production.INFO: ==31140== Releasing lock... [2025-03-03 15:11:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:11:27] Production.INFO: 78.25 MB #Memory Used# [2025-03-03 15:12:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:12:06 [end_date_ymd] => 2025-03-03 15:12:06 [RateCDR] => 1 ) [2025-03-03 15: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-03 12:12:06' and `end` < '2025-03-03 15: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-03 15:12:19] Production.INFO: count ==6718 [2025-03-03 15:12:23] Production.ERROR: pbx CDR StartTime 2025-03-03 12:12:06 - End Time 2025-03-03 15:12:06 [2025-03-03 15:12:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:12:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599302', 'tblTempUsageDetail_20' ) start [2025-03-03 15:12:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599302', 'tblTempUsageDetail_20' ) end [2025-03-03 15:12:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599302', 'tblTempVendorCDR_20' ) start [2025-03-03 15:12:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599302', 'tblTempVendorCDR_20' ) end [2025-03-03 15:12:23] Production.INFO: ProcessCDR(1,14599302,1,1,2) [2025-03-03 15:12:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599302,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:12:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599302,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:12:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599302,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:12:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599302,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:12:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599302', 'tblTempUsageDetail_20' ) start [2025-03-03 15:12:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599302', 'tblTempUsageDetail_20' ) end [2025-03-03 15:12:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:12:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:12:28] Production.INFO: ==31296== Releasing lock... [2025-03-03 15:12:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:12:28] Production.INFO: 78.25 MB #Memory Used# [2025-03-03 15:13:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:13:06 [end_date_ymd] => 2025-03-03 15:13:06 [RateCDR] => 1 ) [2025-03-03 15:13:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 12:13:06' and `end` < '2025-03-03 15:13:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 15:13:19] Production.INFO: count ==6726 [2025-03-03 15:13:23] Production.ERROR: pbx CDR StartTime 2025-03-03 12:13:06 - End Time 2025-03-03 15:13:06 [2025-03-03 15:13:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:13:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599307', 'tblTempUsageDetail_20' ) start [2025-03-03 15:13:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599307', 'tblTempUsageDetail_20' ) end [2025-03-03 15:13:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599307', 'tblTempVendorCDR_20' ) start [2025-03-03 15:13:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599307', 'tblTempVendorCDR_20' ) end [2025-03-03 15:13:23] Production.INFO: ProcessCDR(1,14599307,1,1,2) [2025-03-03 15:13:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599307,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:13:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599307,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:13:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599307,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:13:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599307,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:13:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599307', 'tblTempUsageDetail_20' ) start [2025-03-03 15:13:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599307', 'tblTempUsageDetail_20' ) end [2025-03-03 15:13:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:13:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:13:28] Production.INFO: ==31369== Releasing lock... [2025-03-03 15:13:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:13:28] Production.INFO: 78.25 MB #Memory Used# [2025-03-03 15:14:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:14:05 [end_date_ymd] => 2025-03-03 15:14:05 [RateCDR] => 1 ) [2025-03-03 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-03 12:14:05' and `end` < '2025-03-03 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-03 15:14:19] Production.INFO: count ==6701 [2025-03-03 15:14:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:14:05 - End Time 2025-03-03 15:14:05 [2025-03-03 15:14:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:14:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599312', 'tblTempUsageDetail_20' ) start [2025-03-03 15:14:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599312', 'tblTempUsageDetail_20' ) end [2025-03-03 15:14:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599312', 'tblTempVendorCDR_20' ) start [2025-03-03 15:14:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599312', 'tblTempVendorCDR_20' ) end [2025-03-03 15:14:23] Production.INFO: ProcessCDR(1,14599312,1,1,2) [2025-03-03 15:14:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599312,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:14:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599312,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:14:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599312,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:14:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599312,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:14:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599312', 'tblTempUsageDetail_20' ) start [2025-03-03 15:14:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599312', 'tblTempUsageDetail_20' ) end [2025-03-03 15:14:29] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:14:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:14:29] Production.INFO: ==31444== Releasing lock... [2025-03-03 15:14:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:14:29] Production.INFO: 78.25 MB #Memory Used# [2025-03-03 15:15:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:15:05 [end_date_ymd] => 2025-03-03 15:15:05 [RateCDR] => 1 ) [2025-03-03 15:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 12:15:05' and `end` < '2025-03-03 15:15:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 15:15:19] Production.INFO: count ==6700 [2025-03-03 15:15:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:15:05 - End Time 2025-03-03 15:15:05 [2025-03-03 15:15:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:15:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599317', 'tblTempUsageDetail_20' ) start [2025-03-03 15:15:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599317', 'tblTempUsageDetail_20' ) end [2025-03-03 15:15:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599317', 'tblTempVendorCDR_20' ) start [2025-03-03 15:15:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599317', 'tblTempVendorCDR_20' ) end [2025-03-03 15:15:23] Production.INFO: ProcessCDR(1,14599317,1,1,2) [2025-03-03 15:15:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599317,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:15:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599317,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:15:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599317,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:15:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599317,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:15:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599317', 'tblTempUsageDetail_20' ) start [2025-03-03 15:15:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599317', 'tblTempUsageDetail_20' ) end [2025-03-03 15:15:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:15:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:15:28] Production.INFO: ==31599== Releasing lock... [2025-03-03 15:15:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:15:28] Production.INFO: 78.25 MB #Memory Used# [2025-03-03 15:16:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:16:06 [end_date_ymd] => 2025-03-03 15:16:06 [RateCDR] => 1 ) [2025-03-03 15: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-03 12:16:06' and `end` < '2025-03-03 15: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-03 15:16:20] Production.INFO: count ==6694 [2025-03-03 15:16:23] Production.ERROR: pbx CDR StartTime 2025-03-03 12:16:06 - End Time 2025-03-03 15:16:06 [2025-03-03 15:16:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:16:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599322', 'tblTempUsageDetail_20' ) start [2025-03-03 15:16:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599322', 'tblTempUsageDetail_20' ) end [2025-03-03 15:16:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599322', 'tblTempVendorCDR_20' ) start [2025-03-03 15:16:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599322', 'tblTempVendorCDR_20' ) end [2025-03-03 15:16:24] Production.INFO: ProcessCDR(1,14599322,1,1,2) [2025-03-03 15:16:24] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599322,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:16:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599322,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:16:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599322,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:16:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599322,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:16:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599322', 'tblTempUsageDetail_20' ) start [2025-03-03 15:16:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599322', 'tblTempUsageDetail_20' ) end [2025-03-03 15:16:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:16:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:16:29] Production.INFO: ==31669== Releasing lock... [2025-03-03 15:16:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:16:29] Production.INFO: 78 MB #Memory Used# [2025-03-03 15:17:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:17:05 [end_date_ymd] => 2025-03-03 15:17:05 [RateCDR] => 1 ) [2025-03-03 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-03 12:17:05' and `end` < '2025-03-03 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-03 15:17:18] Production.INFO: count ==6673 [2025-03-03 15:17:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:17:05 - End Time 2025-03-03 15:17:05 [2025-03-03 15:17:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:17:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599327', 'tblTempUsageDetail_20' ) start [2025-03-03 15:17:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599327', 'tblTempUsageDetail_20' ) end [2025-03-03 15:17:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599327', 'tblTempVendorCDR_20' ) start [2025-03-03 15:17:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599327', 'tblTempVendorCDR_20' ) end [2025-03-03 15:17:22] Production.INFO: ProcessCDR(1,14599327,1,1,2) [2025-03-03 15:17:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599327,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:17:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599327,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:17:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599327,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:17:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599327,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:17:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599327', 'tblTempUsageDetail_20' ) start [2025-03-03 15:17:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599327', 'tblTempUsageDetail_20' ) end [2025-03-03 15:17:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:17:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:17:27] Production.INFO: ==31742== Releasing lock... [2025-03-03 15:17:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:17:27] Production.INFO: 78 MB #Memory Used# [2025-03-03 15:18:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:18:05 [end_date_ymd] => 2025-03-03 15:18:05 [RateCDR] => 1 ) [2025-03-03 15:18:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 12:18:05' and `end` < '2025-03-03 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-03 15:18:19] Production.INFO: count ==6665 [2025-03-03 15:18:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:18:05 - End Time 2025-03-03 15:18:05 [2025-03-03 15:18:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:18:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599332', 'tblTempUsageDetail_20' ) start [2025-03-03 15:18:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599332', 'tblTempUsageDetail_20' ) end [2025-03-03 15:18:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599332', 'tblTempVendorCDR_20' ) start [2025-03-03 15:18:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599332', 'tblTempVendorCDR_20' ) end [2025-03-03 15:18:22] Production.INFO: ProcessCDR(1,14599332,1,1,2) [2025-03-03 15:18:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599332,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:18:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599332,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:18:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599332,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:18:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599332,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:18:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599332', 'tblTempUsageDetail_20' ) start [2025-03-03 15:18:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599332', 'tblTempUsageDetail_20' ) end [2025-03-03 15:18:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:18:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:18:28] Production.INFO: ==31853== Releasing lock... [2025-03-03 15:18:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:18:28] Production.INFO: 78 MB #Memory Used# [2025-03-03 15:19:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:19:05 [end_date_ymd] => 2025-03-03 15:19:05 [RateCDR] => 1 ) [2025-03-03 15:19:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 12:19:05' and `end` < '2025-03-03 15:19:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 15:19:19] Production.INFO: count ==6678 [2025-03-03 15:19:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:19:05 - End Time 2025-03-03 15:19:05 [2025-03-03 15:19:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:19:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599337', 'tblTempUsageDetail_20' ) start [2025-03-03 15:19:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599337', 'tblTempUsageDetail_20' ) end [2025-03-03 15:19:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599337', 'tblTempVendorCDR_20' ) start [2025-03-03 15:19:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599337', 'tblTempVendorCDR_20' ) end [2025-03-03 15:19:22] Production.INFO: ProcessCDR(1,14599337,1,1,2) [2025-03-03 15:19:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599337,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:19:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599337,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:19:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599337,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:19:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599337,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:19:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599337', 'tblTempUsageDetail_20' ) start [2025-03-03 15:19:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599337', 'tblTempUsageDetail_20' ) end [2025-03-03 15:19:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:19:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:19:28] Production.INFO: ==31930== Releasing lock... [2025-03-03 15:19:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:19:28] Production.INFO: 78 MB #Memory Used# [2025-03-03 15:20:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:20:07 [end_date_ymd] => 2025-03-03 15:20:07 [RateCDR] => 1 ) [2025-03-03 15: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-03 12:20:07' and `end` < '2025-03-03 15: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-03 15:20:20] Production.INFO: count ==6636 [2025-03-03 15:20:23] Production.ERROR: pbx CDR StartTime 2025-03-03 12:20:07 - End Time 2025-03-03 15:20:07 [2025-03-03 15:20:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:20:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599343', 'tblTempUsageDetail_20' ) start [2025-03-03 15:20:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599343', 'tblTempUsageDetail_20' ) end [2025-03-03 15:20:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599343', 'tblTempVendorCDR_20' ) start [2025-03-03 15:20:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599343', 'tblTempVendorCDR_20' ) end [2025-03-03 15:20:24] Production.INFO: ProcessCDR(1,14599343,1,1,2) [2025-03-03 15:20:24] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599343,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:20:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599343,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:20:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599343,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:20:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599343,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:20:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599343', 'tblTempUsageDetail_20' ) start [2025-03-03 15:20:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599343', 'tblTempUsageDetail_20' ) end [2025-03-03 15:20:29] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:20:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:20:29] Production.INFO: ==32004== Releasing lock... [2025-03-03 15:20:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:20:29] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 15:21:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:21:05 [end_date_ymd] => 2025-03-03 15:21:05 [RateCDR] => 1 ) [2025-03-03 15:21:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 12:21:05' and `end` < '2025-03-03 15:21:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 15:21:19] Production.INFO: count ==6626 [2025-03-03 15:21:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:21:05 - End Time 2025-03-03 15:21:05 [2025-03-03 15:21:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:21:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599348', 'tblTempUsageDetail_20' ) start [2025-03-03 15:21:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599348', 'tblTempUsageDetail_20' ) end [2025-03-03 15:21:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599348', 'tblTempVendorCDR_20' ) start [2025-03-03 15:21:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599348', 'tblTempVendorCDR_20' ) end [2025-03-03 15:21:23] Production.INFO: ProcessCDR(1,14599348,1,1,2) [2025-03-03 15:21:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599348,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:21:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599348,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:21:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599348,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:21:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599348,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:21:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599348', 'tblTempUsageDetail_20' ) start [2025-03-03 15:21:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599348', 'tblTempUsageDetail_20' ) end [2025-03-03 15:21:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:21:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:21:28] Production.INFO: ==32080== Releasing lock... [2025-03-03 15:21:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:21:28] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 15:22:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:22:06 [end_date_ymd] => 2025-03-03 15:22:06 [RateCDR] => 1 ) [2025-03-03 15:22:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 12:22:06' and `end` < '2025-03-03 15:22:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 15:22:19] Production.INFO: count ==6670 [2025-03-03 15:22:23] Production.ERROR: pbx CDR StartTime 2025-03-03 12:22:06 - End Time 2025-03-03 15:22:06 [2025-03-03 15:22:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:22:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599353', 'tblTempUsageDetail_20' ) start [2025-03-03 15:22:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599353', 'tblTempUsageDetail_20' ) end [2025-03-03 15:22:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599353', 'tblTempVendorCDR_20' ) start [2025-03-03 15:22:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599353', 'tblTempVendorCDR_20' ) end [2025-03-03 15:22:23] Production.INFO: ProcessCDR(1,14599353,1,1,2) [2025-03-03 15:22:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599353,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:22:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599353,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:22:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599353,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:22:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599353,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:22:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599353', 'tblTempUsageDetail_20' ) start [2025-03-03 15:22:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599353', 'tblTempUsageDetail_20' ) end [2025-03-03 15:22:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:22:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:22:28] Production.INFO: ==32150== Releasing lock... [2025-03-03 15:22:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:22:28] Production.INFO: 78 MB #Memory Used# [2025-03-03 15:23:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:23:05 [end_date_ymd] => 2025-03-03 15:23:05 [RateCDR] => 1 ) [2025-03-03 15:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 12:23:05' and `end` < '2025-03-03 15:23:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 15:23:18] Production.INFO: count ==6640 [2025-03-03 15:23:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:23:05 - End Time 2025-03-03 15:23:05 [2025-03-03 15:23:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:23:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599358', 'tblTempUsageDetail_20' ) start [2025-03-03 15:23:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599358', 'tblTempUsageDetail_20' ) end [2025-03-03 15:23:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599358', 'tblTempVendorCDR_20' ) start [2025-03-03 15:23:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599358', 'tblTempVendorCDR_20' ) end [2025-03-03 15:23:22] Production.INFO: ProcessCDR(1,14599358,1,1,2) [2025-03-03 15:23:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599358,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:23:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599358,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:23:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599358,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:23:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599358,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:23:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599358', 'tblTempUsageDetail_20' ) start [2025-03-03 15:23:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599358', 'tblTempUsageDetail_20' ) end [2025-03-03 15:23:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:23:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:23:27] Production.INFO: ==32225== Releasing lock... [2025-03-03 15:23:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:23:27] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 15:24:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:24:05 [end_date_ymd] => 2025-03-03 15:24:05 [RateCDR] => 1 ) [2025-03-03 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-03 12:24:05' and `end` < '2025-03-03 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-03 15:24:19] Production.INFO: count ==6629 [2025-03-03 15:24:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:24:05 - End Time 2025-03-03 15:24:05 [2025-03-03 15:24:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:24:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599363', 'tblTempUsageDetail_20' ) start [2025-03-03 15:24:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599363', 'tblTempUsageDetail_20' ) end [2025-03-03 15:24:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599363', 'tblTempVendorCDR_20' ) start [2025-03-03 15:24:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599363', 'tblTempVendorCDR_20' ) end [2025-03-03 15:24:22] Production.INFO: ProcessCDR(1,14599363,1,1,2) [2025-03-03 15:24:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599363,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:24:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599363,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:24:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599363,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:24:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599363,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:24:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599363', 'tblTempUsageDetail_20' ) start [2025-03-03 15:24:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599363', 'tblTempUsageDetail_20' ) end [2025-03-03 15:24:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:24:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:24:28] Production.INFO: ==32299== Releasing lock... [2025-03-03 15:24:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:24:28] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 15:25:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:25:05 [end_date_ymd] => 2025-03-03 15:25:05 [RateCDR] => 1 ) [2025-03-03 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-03 12:25:05' and `end` < '2025-03-03 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-03 15:25:19] Production.INFO: count ==6618 [2025-03-03 15:25:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:25:05 - End Time 2025-03-03 15:25:05 [2025-03-03 15:25:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:25:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599368', 'tblTempUsageDetail_20' ) start [2025-03-03 15:25:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599368', 'tblTempUsageDetail_20' ) end [2025-03-03 15:25:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599368', 'tblTempVendorCDR_20' ) start [2025-03-03 15:25:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599368', 'tblTempVendorCDR_20' ) end [2025-03-03 15:25:22] Production.INFO: ProcessCDR(1,14599368,1,1,2) [2025-03-03 15:25:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599368,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:25:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599368,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:25:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599368,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:25:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599368,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:25:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599368', 'tblTempUsageDetail_20' ) start [2025-03-03 15:25:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599368', 'tblTempUsageDetail_20' ) end [2025-03-03 15:25:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:25:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:25:26] Production.INFO: ==32371== Releasing lock... [2025-03-03 15:25:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:25:26] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 15:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:26:05 [end_date_ymd] => 2025-03-03 15:26:05 [RateCDR] => 1 ) [2025-03-03 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-03 12:26:05' and `end` < '2025-03-03 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-03 15:26:19] Production.INFO: count ==6639 [2025-03-03 15:26:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:26:05 - End Time 2025-03-03 15:26:05 [2025-03-03 15:26:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:26:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599373', 'tblTempUsageDetail_20' ) start [2025-03-03 15:26:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599373', 'tblTempUsageDetail_20' ) end [2025-03-03 15:26:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599373', 'tblTempVendorCDR_20' ) start [2025-03-03 15:26:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599373', 'tblTempVendorCDR_20' ) end [2025-03-03 15:26:22] Production.INFO: ProcessCDR(1,14599373,1,1,2) [2025-03-03 15:26:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599373,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:26:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599373,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:26:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599373,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:26:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599373,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:26:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599373', 'tblTempUsageDetail_20' ) start [2025-03-03 15:26:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599373', 'tblTempUsageDetail_20' ) end [2025-03-03 15:26:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:26:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:26:27] Production.INFO: ==32452== Releasing lock... [2025-03-03 15:26:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:26:27] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 15:27:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:27:05 [end_date_ymd] => 2025-03-03 15:27:05 [RateCDR] => 1 ) [2025-03-03 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-03 12:27:05' and `end` < '2025-03-03 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-03 15:27:18] Production.INFO: count ==6655 [2025-03-03 15:27:21] Production.ERROR: pbx CDR StartTime 2025-03-03 12:27:05 - End Time 2025-03-03 15:27:05 [2025-03-03 15:27:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:27:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599378', 'tblTempUsageDetail_20' ) start [2025-03-03 15:27:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599378', 'tblTempUsageDetail_20' ) end [2025-03-03 15:27:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599378', 'tblTempVendorCDR_20' ) start [2025-03-03 15:27:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599378', 'tblTempVendorCDR_20' ) end [2025-03-03 15:27:21] Production.INFO: ProcessCDR(1,14599378,1,1,2) [2025-03-03 15:27:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599378,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:27:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599378,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:27:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599378,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:27:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599378,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:27:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599378', 'tblTempUsageDetail_20' ) start [2025-03-03 15:27:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599378', 'tblTempUsageDetail_20' ) end [2025-03-03 15:27:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:27:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:27:26] Production.INFO: ==32527== Releasing lock... [2025-03-03 15:27:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:27:26] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 15:28:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:28:06 [end_date_ymd] => 2025-03-03 15:28:06 [RateCDR] => 1 ) [2025-03-03 15:28:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 12:28:06' and `end` < '2025-03-03 15:28:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 15:28:19] Production.INFO: count ==6628 [2025-03-03 15:28:23] Production.ERROR: pbx CDR StartTime 2025-03-03 12:28:06 - End Time 2025-03-03 15:28:06 [2025-03-03 15:28:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:28:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599383', 'tblTempUsageDetail_20' ) start [2025-03-03 15:28:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599383', 'tblTempUsageDetail_20' ) end [2025-03-03 15:28:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599383', 'tblTempVendorCDR_20' ) start [2025-03-03 15:28:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599383', 'tblTempVendorCDR_20' ) end [2025-03-03 15:28:23] Production.INFO: ProcessCDR(1,14599383,1,1,2) [2025-03-03 15:28:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599383,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:28:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599383,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:28:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599383,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:28:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599383,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:28:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599383', 'tblTempUsageDetail_20' ) start [2025-03-03 15:28:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599383', 'tblTempUsageDetail_20' ) end [2025-03-03 15:28:29] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:28:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:28:29] Production.INFO: ==32598== Releasing lock... [2025-03-03 15:28:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:28:29] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 15:29:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:29:05 [end_date_ymd] => 2025-03-03 15:29:05 [RateCDR] => 1 ) [2025-03-03 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-03 12:29:05' and `end` < '2025-03-03 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-03 15:29:19] Production.INFO: count ==6634 [2025-03-03 15:29:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:29:05 - End Time 2025-03-03 15:29:05 [2025-03-03 15:29:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:29:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599388', 'tblTempUsageDetail_20' ) start [2025-03-03 15:29:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599388', 'tblTempUsageDetail_20' ) end [2025-03-03 15:29:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599388', 'tblTempVendorCDR_20' ) start [2025-03-03 15:29:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599388', 'tblTempVendorCDR_20' ) end [2025-03-03 15:29:23] Production.INFO: ProcessCDR(1,14599388,1,1,2) [2025-03-03 15:29:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599388,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:29:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599388,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:29:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599388,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:29:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599388,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:29:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599388', 'tblTempUsageDetail_20' ) start [2025-03-03 15:29:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599388', 'tblTempUsageDetail_20' ) end [2025-03-03 15:29:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:29:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:29:28] Production.INFO: ==32668== Releasing lock... [2025-03-03 15:29:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:29:28] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 15:30:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:30:06 [end_date_ymd] => 2025-03-03 15:30:06 [RateCDR] => 1 ) [2025-03-03 15:30:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 12:30:06' and `end` < '2025-03-03 15:30:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 15:30:19] Production.INFO: count ==6618 [2025-03-03 15:30:23] Production.ERROR: pbx CDR StartTime 2025-03-03 12:30:06 - End Time 2025-03-03 15:30:06 [2025-03-03 15:30:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:30:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599393', 'tblTempUsageDetail_20' ) start [2025-03-03 15:30:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599393', 'tblTempUsageDetail_20' ) end [2025-03-03 15:30:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599393', 'tblTempVendorCDR_20' ) start [2025-03-03 15:30:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599393', 'tblTempVendorCDR_20' ) end [2025-03-03 15:30:23] Production.INFO: ProcessCDR(1,14599393,1,1,2) [2025-03-03 15:30:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599393,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:30:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599393,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:30:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599393,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:30:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599393,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:30:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599393', 'tblTempUsageDetail_20' ) start [2025-03-03 15:30:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599393', 'tblTempUsageDetail_20' ) end [2025-03-03 15:30:29] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:30:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:30:29] Production.INFO: ==32747== Releasing lock... [2025-03-03 15:30:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:30:29] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 15:31:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:31:05 [end_date_ymd] => 2025-03-03 15:31:05 [RateCDR] => 1 ) [2025-03-03 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-03 12:31:05' and `end` < '2025-03-03 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-03 15:31:18] Production.INFO: count ==6619 [2025-03-03 15:31:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:31:05 - End Time 2025-03-03 15:31:05 [2025-03-03 15:31:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:31:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599399', 'tblTempUsageDetail_20' ) start [2025-03-03 15:31:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599399', 'tblTempUsageDetail_20' ) end [2025-03-03 15:31:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599399', 'tblTempVendorCDR_20' ) start [2025-03-03 15:31:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599399', 'tblTempVendorCDR_20' ) end [2025-03-03 15:31:22] Production.INFO: ProcessCDR(1,14599399,1,1,2) [2025-03-03 15:31:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599399,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:31:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599399,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:31:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599399,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:31:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599399,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:31:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599399', 'tblTempUsageDetail_20' ) start [2025-03-03 15:31:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599399', 'tblTempUsageDetail_20' ) end [2025-03-03 15:31:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:31:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:31:27] Production.INFO: ==372== Releasing lock... [2025-03-03 15:31:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:31:27] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 15:32:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:32:05 [end_date_ymd] => 2025-03-03 15:32:05 [RateCDR] => 1 ) [2025-03-03 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-03 12:32:05' and `end` < '2025-03-03 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-03 15:32:19] Production.INFO: count ==6628 [2025-03-03 15:32:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:32:05 - End Time 2025-03-03 15:32:05 [2025-03-03 15:32:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:32:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599404', 'tblTempUsageDetail_20' ) start [2025-03-03 15:32:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599404', 'tblTempUsageDetail_20' ) end [2025-03-03 15:32:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599404', 'tblTempVendorCDR_20' ) start [2025-03-03 15:32:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599404', 'tblTempVendorCDR_20' ) end [2025-03-03 15:32:22] Production.INFO: ProcessCDR(1,14599404,1,1,2) [2025-03-03 15:32:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599404,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:32:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599404,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:32:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599404,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:32:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599404,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:32:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599404', 'tblTempUsageDetail_20' ) start [2025-03-03 15:32:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599404', 'tblTempUsageDetail_20' ) end [2025-03-03 15:32:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:32:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:32:27] Production.INFO: ==442== Releasing lock... [2025-03-03 15:32:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:32:27] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 15:33:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:33:06 [end_date_ymd] => 2025-03-03 15:33:06 [RateCDR] => 1 ) [2025-03-03 15: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-03 12:33:06' and `end` < '2025-03-03 15: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-03 15:33:19] Production.INFO: count ==6633 [2025-03-03 15:33:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:33:06 - End Time 2025-03-03 15:33:06 [2025-03-03 15:33:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:33:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599409', 'tblTempUsageDetail_20' ) start [2025-03-03 15:33:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599409', 'tblTempUsageDetail_20' ) end [2025-03-03 15:33:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599409', 'tblTempVendorCDR_20' ) start [2025-03-03 15:33:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599409', 'tblTempVendorCDR_20' ) end [2025-03-03 15:33:23] Production.INFO: ProcessCDR(1,14599409,1,1,2) [2025-03-03 15:33:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599409,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:33:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599409,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:33:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599409,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:33:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599409,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:33:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599409', 'tblTempUsageDetail_20' ) start [2025-03-03 15:33:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599409', 'tblTempUsageDetail_20' ) end [2025-03-03 15:33:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:33:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:33:28] Production.INFO: ==555== Releasing lock... [2025-03-03 15:33:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:33:28] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 15:34:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:34:05 [end_date_ymd] => 2025-03-03 15:34:05 [RateCDR] => 1 ) [2025-03-03 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-03 12:34:05' and `end` < '2025-03-03 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-03 15:34:18] Production.INFO: count ==6619 [2025-03-03 15:34:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:34:05 - End Time 2025-03-03 15:34:05 [2025-03-03 15:34:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:34:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599414', 'tblTempUsageDetail_20' ) start [2025-03-03 15:34:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599414', 'tblTempUsageDetail_20' ) end [2025-03-03 15:34:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599414', 'tblTempVendorCDR_20' ) start [2025-03-03 15:34:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599414', 'tblTempVendorCDR_20' ) end [2025-03-03 15:34:22] Production.INFO: ProcessCDR(1,14599414,1,1,2) [2025-03-03 15:34:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599414,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:34:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599414,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:34:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599414,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:34:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599414,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:34:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599414', 'tblTempUsageDetail_20' ) start [2025-03-03 15:34:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599414', 'tblTempUsageDetail_20' ) end [2025-03-03 15:34:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:34:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:34:27] Production.INFO: ==643== Releasing lock... [2025-03-03 15:34:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:34:27] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 15:35:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:35:06 [end_date_ymd] => 2025-03-03 15:35:06 [RateCDR] => 1 ) [2025-03-03 15:35:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 12:35:06' and `end` < '2025-03-03 15:35:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 15:35:19] Production.INFO: count ==6608 [2025-03-03 15:35:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:35:06 - End Time 2025-03-03 15:35:06 [2025-03-03 15:35:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:35:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599419', 'tblTempUsageDetail_20' ) start [2025-03-03 15:35:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599419', 'tblTempUsageDetail_20' ) end [2025-03-03 15:35:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599419', 'tblTempVendorCDR_20' ) start [2025-03-03 15:35:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599419', 'tblTempVendorCDR_20' ) end [2025-03-03 15:35:23] Production.INFO: ProcessCDR(1,14599419,1,1,2) [2025-03-03 15:35:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599419,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:35:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599419,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:35:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599419,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:35:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599419,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:35:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599419', 'tblTempUsageDetail_20' ) start [2025-03-03 15:35:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599419', 'tblTempUsageDetail_20' ) end [2025-03-03 15:35:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:35:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:35:28] Production.INFO: ==738== Releasing lock... [2025-03-03 15:35:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:35:28] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 15:36:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:36:05 [end_date_ymd] => 2025-03-03 15:36:05 [RateCDR] => 1 ) [2025-03-03 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-03 12:36:05' and `end` < '2025-03-03 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-03 15:36:19] Production.INFO: count ==6619 [2025-03-03 15:36:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:36:05 - End Time 2025-03-03 15:36:05 [2025-03-03 15:36:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:36:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599424', 'tblTempUsageDetail_20' ) start [2025-03-03 15:36:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599424', 'tblTempUsageDetail_20' ) end [2025-03-03 15:36:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599424', 'tblTempVendorCDR_20' ) start [2025-03-03 15:36:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599424', 'tblTempVendorCDR_20' ) end [2025-03-03 15:36:22] Production.INFO: ProcessCDR(1,14599424,1,1,2) [2025-03-03 15:36:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599424,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:36:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599424,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:36:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599424,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:36:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599424,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:36:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599424', 'tblTempUsageDetail_20' ) start [2025-03-03 15:36:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599424', 'tblTempUsageDetail_20' ) end [2025-03-03 15:36:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:36:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:36:28] Production.INFO: ==819== Releasing lock... [2025-03-03 15:36:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:36:28] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 15:37:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:37:06 [end_date_ymd] => 2025-03-03 15:37:06 [RateCDR] => 1 ) [2025-03-03 15:37:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 12:37:06' and `end` < '2025-03-03 15:37:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 15:37:19] Production.INFO: count ==6592 [2025-03-03 15:37:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:37:06 - End Time 2025-03-03 15:37:06 [2025-03-03 15:37:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:37:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599429', 'tblTempUsageDetail_20' ) start [2025-03-03 15:37:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599429', 'tblTempUsageDetail_20' ) end [2025-03-03 15:37:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599429', 'tblTempVendorCDR_20' ) start [2025-03-03 15:37:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599429', 'tblTempVendorCDR_20' ) end [2025-03-03 15:37:23] Production.INFO: ProcessCDR(1,14599429,1,1,2) [2025-03-03 15:37:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599429,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:37:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599429,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:37:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599429,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:37:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599429,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:37:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599429', 'tblTempUsageDetail_20' ) start [2025-03-03 15:37:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599429', 'tblTempUsageDetail_20' ) end [2025-03-03 15:37:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:37:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:37:28] Production.INFO: ==890== Releasing lock... [2025-03-03 15:37:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:37:28] Production.INFO: 77.25 MB #Memory Used# [2025-03-03 15:38:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:38:05 [end_date_ymd] => 2025-03-03 15:38:05 [RateCDR] => 1 ) [2025-03-03 15:38:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 12:38:05' and `end` < '2025-03-03 15:38:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 15:38:19] Production.INFO: count ==6583 [2025-03-03 15:38:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:38:05 - End Time 2025-03-03 15:38:05 [2025-03-03 15:38:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:38:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599434', 'tblTempUsageDetail_20' ) start [2025-03-03 15:38:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599434', 'tblTempUsageDetail_20' ) end [2025-03-03 15:38:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599434', 'tblTempVendorCDR_20' ) start [2025-03-03 15:38:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599434', 'tblTempVendorCDR_20' ) end [2025-03-03 15:38:22] Production.INFO: ProcessCDR(1,14599434,1,1,2) [2025-03-03 15:38:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599434,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:38:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599434,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:38:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599434,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:38:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599434,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:38:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599434', 'tblTempUsageDetail_20' ) start [2025-03-03 15:38:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599434', 'tblTempUsageDetail_20' ) end [2025-03-03 15:38:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:38:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:38:27] Production.INFO: ==961== Releasing lock... [2025-03-03 15:38:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:38:27] Production.INFO: 77.25 MB #Memory Used# [2025-03-03 15:39:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:39:05 [end_date_ymd] => 2025-03-03 15:39:05 [RateCDR] => 1 ) [2025-03-03 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-03 12:39:05' and `end` < '2025-03-03 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-03 15:39:19] Production.INFO: count ==6570 [2025-03-03 15:39:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:39:05 - End Time 2025-03-03 15:39:05 [2025-03-03 15:39:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:39:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599439', 'tblTempUsageDetail_20' ) start [2025-03-03 15:39:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599439', 'tblTempUsageDetail_20' ) end [2025-03-03 15:39:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599439', 'tblTempVendorCDR_20' ) start [2025-03-03 15:39:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599439', 'tblTempVendorCDR_20' ) end [2025-03-03 15:39:22] Production.INFO: ProcessCDR(1,14599439,1,1,2) [2025-03-03 15:39:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599439,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:39:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599439,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:39:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599439,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:39:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599439,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:39:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599439', 'tblTempUsageDetail_20' ) start [2025-03-03 15:39:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599439', 'tblTempUsageDetail_20' ) end [2025-03-03 15:39:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:39:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:39:27] Production.INFO: ==1032== Releasing lock... [2025-03-03 15:39:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:39:27] Production.INFO: 77.25 MB #Memory Used# [2025-03-03 15:40:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:40:06 [end_date_ymd] => 2025-03-03 15:40:06 [RateCDR] => 1 ) [2025-03-03 15:40:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 12:40:06' and `end` < '2025-03-03 15:40:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 15:40:19] Production.INFO: count ==6562 [2025-03-03 15:40:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:40:06 - End Time 2025-03-03 15:40:06 [2025-03-03 15:40:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:40:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599445', 'tblTempUsageDetail_20' ) start [2025-03-03 15:40:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599445', 'tblTempUsageDetail_20' ) end [2025-03-03 15:40:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599445', 'tblTempVendorCDR_20' ) start [2025-03-03 15:40:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599445', 'tblTempVendorCDR_20' ) end [2025-03-03 15:40:23] Production.INFO: ProcessCDR(1,14599445,1,1,2) [2025-03-03 15:40:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599445,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:40:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599445,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:40:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599445,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:40:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599445,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:40:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599445', 'tblTempUsageDetail_20' ) start [2025-03-03 15:40:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599445', 'tblTempUsageDetail_20' ) end [2025-03-03 15:40:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:40:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:40:28] Production.INFO: ==1107== Releasing lock... [2025-03-03 15:40:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:40:28] Production.INFO: 77.25 MB #Memory Used# [2025-03-03 15:41:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:41:05 [end_date_ymd] => 2025-03-03 15:41:05 [RateCDR] => 1 ) [2025-03-03 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-03 12:41:05' and `end` < '2025-03-03 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-03 15:41:19] Production.INFO: count ==6529 [2025-03-03 15:41:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:41:05 - End Time 2025-03-03 15:41:05 [2025-03-03 15:41:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:41:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599450', 'tblTempUsageDetail_20' ) start [2025-03-03 15:41:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599450', 'tblTempUsageDetail_20' ) end [2025-03-03 15:41:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599450', 'tblTempVendorCDR_20' ) start [2025-03-03 15:41:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599450', 'tblTempVendorCDR_20' ) end [2025-03-03 15:41:22] Production.INFO: ProcessCDR(1,14599450,1,1,2) [2025-03-03 15:41:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599450,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:41:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599450,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:41:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599450,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:41:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599450,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:41:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599450', 'tblTempUsageDetail_20' ) start [2025-03-03 15:41:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599450', 'tblTempUsageDetail_20' ) end [2025-03-03 15:41:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:41:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:41:28] Production.INFO: ==1191== Releasing lock... [2025-03-03 15:41:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:41:28] Production.INFO: 77 MB #Memory Used# [2025-03-03 15:42:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:42:05 [end_date_ymd] => 2025-03-03 15:42:05 [RateCDR] => 1 ) [2025-03-03 15:42:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 12:42:05' and `end` < '2025-03-03 15:42:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 15:42:19] Production.INFO: count ==6515 [2025-03-03 15:42:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:42:05 - End Time 2025-03-03 15:42:05 [2025-03-03 15:42:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:42:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599455', 'tblTempUsageDetail_20' ) start [2025-03-03 15:42:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599455', 'tblTempUsageDetail_20' ) end [2025-03-03 15:42:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599455', 'tblTempVendorCDR_20' ) start [2025-03-03 15:42:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599455', 'tblTempVendorCDR_20' ) end [2025-03-03 15:42:22] Production.INFO: ProcessCDR(1,14599455,1,1,2) [2025-03-03 15:42:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599455,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:42:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599455,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:42:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599455,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:42:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599455,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:42:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599455', 'tblTempUsageDetail_20' ) start [2025-03-03 15:42:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599455', 'tblTempUsageDetail_20' ) end [2025-03-03 15:42:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:42:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:42:27] Production.INFO: ==1279== Releasing lock... [2025-03-03 15:42:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:42:27] Production.INFO: 76.75 MB #Memory Used# [2025-03-03 15:43:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:43:06 [end_date_ymd] => 2025-03-03 15:43:06 [RateCDR] => 1 ) [2025-03-03 15:43:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 12:43:06' and `end` < '2025-03-03 15:43:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 15:43:19] Production.INFO: count ==6503 [2025-03-03 15:43:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:43:06 - End Time 2025-03-03 15:43:06 [2025-03-03 15:43:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:43:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599460', 'tblTempUsageDetail_20' ) start [2025-03-03 15:43:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599460', 'tblTempUsageDetail_20' ) end [2025-03-03 15:43:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599460', 'tblTempVendorCDR_20' ) start [2025-03-03 15:43:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599460', 'tblTempVendorCDR_20' ) end [2025-03-03 15:43:23] Production.INFO: ProcessCDR(1,14599460,1,1,2) [2025-03-03 15:43:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599460,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:43:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599460,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:43:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599460,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:43:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599460,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:43:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599460', 'tblTempUsageDetail_20' ) start [2025-03-03 15:43:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599460', 'tblTempUsageDetail_20' ) end [2025-03-03 15:43:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:43:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:43:28] Production.INFO: ==1357== Releasing lock... [2025-03-03 15:43:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:43:28] Production.INFO: 76.75 MB #Memory Used# [2025-03-03 15:44:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:44:05 [end_date_ymd] => 2025-03-03 15:44:05 [RateCDR] => 1 ) [2025-03-03 15:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 12:44:05' and `end` < '2025-03-03 15:44:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 15:44:19] Production.INFO: count ==6541 [2025-03-03 15:44:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:44:05 - End Time 2025-03-03 15:44:05 [2025-03-03 15:44:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:44:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599465', 'tblTempUsageDetail_20' ) start [2025-03-03 15:44:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599465', 'tblTempUsageDetail_20' ) end [2025-03-03 15:44:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599465', 'tblTempVendorCDR_20' ) start [2025-03-03 15:44:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599465', 'tblTempVendorCDR_20' ) end [2025-03-03 15:44:22] Production.INFO: ProcessCDR(1,14599465,1,1,2) [2025-03-03 15:44:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599465,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:44:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599465,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:44:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599465,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:44:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599465,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:44:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599465', 'tblTempUsageDetail_20' ) start [2025-03-03 15:44:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599465', 'tblTempUsageDetail_20' ) end [2025-03-03 15:44:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:44:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:44:27] Production.INFO: ==1426== Releasing lock... [2025-03-03 15:44:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:44:27] Production.INFO: 77 MB #Memory Used# [2025-03-03 15:45:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:45:06 [end_date_ymd] => 2025-03-03 15:45:06 [RateCDR] => 1 ) [2025-03-03 15: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-03 12:45:06' and `end` < '2025-03-03 15: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-03 15:45:20] Production.INFO: count ==6544 [2025-03-03 15:45:23] Production.ERROR: pbx CDR StartTime 2025-03-03 12:45:06 - End Time 2025-03-03 15:45:06 [2025-03-03 15:45:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:45:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599470', 'tblTempUsageDetail_20' ) start [2025-03-03 15:45:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599470', 'tblTempUsageDetail_20' ) end [2025-03-03 15:45:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599470', 'tblTempVendorCDR_20' ) start [2025-03-03 15:45:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599470', 'tblTempVendorCDR_20' ) end [2025-03-03 15:45:23] Production.INFO: ProcessCDR(1,14599470,1,1,2) [2025-03-03 15:45:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599470,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:45:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599470,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:45:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599470,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:45:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599470,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:45:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599470', 'tblTempUsageDetail_20' ) start [2025-03-03 15:45:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599470', 'tblTempUsageDetail_20' ) end [2025-03-03 15:45:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:45:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:45:26] Production.INFO: ==1498== Releasing lock... [2025-03-03 15:45:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:45:26] Production.INFO: 77 MB #Memory Used# [2025-03-03 15:46:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:46:05 [end_date_ymd] => 2025-03-03 15:46:05 [RateCDR] => 1 ) [2025-03-03 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-03 12:46:05' and `end` < '2025-03-03 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-03 15:46:19] Production.INFO: count ==6558 [2025-03-03 15:46:23] Production.ERROR: pbx CDR StartTime 2025-03-03 12:46:05 - End Time 2025-03-03 15:46:05 [2025-03-03 15:46:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:46:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599475', 'tblTempUsageDetail_20' ) start [2025-03-03 15:46:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599475', 'tblTempUsageDetail_20' ) end [2025-03-03 15:46:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599475', 'tblTempVendorCDR_20' ) start [2025-03-03 15:46:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599475', 'tblTempVendorCDR_20' ) end [2025-03-03 15:46:23] Production.INFO: ProcessCDR(1,14599475,1,1,2) [2025-03-03 15:46:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599475,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:46:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599475,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:46:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599475,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:46:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599475,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:46:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599475', 'tblTempUsageDetail_20' ) start [2025-03-03 15:46:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599475', 'tblTempUsageDetail_20' ) end [2025-03-03 15:46:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:46:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:46:28] Production.INFO: ==1618== Releasing lock... [2025-03-03 15:46:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:46:28] Production.INFO: 77 MB #Memory Used# [2025-03-03 15:47:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:47:05 [end_date_ymd] => 2025-03-03 15:47:05 [RateCDR] => 1 ) [2025-03-03 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-03 12:47:05' and `end` < '2025-03-03 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-03 15:47:19] Production.INFO: count ==6558 [2025-03-03 15:47:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:47:05 - End Time 2025-03-03 15:47:05 [2025-03-03 15:47:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:47:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599480', 'tblTempUsageDetail_20' ) start [2025-03-03 15:47:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599480', 'tblTempUsageDetail_20' ) end [2025-03-03 15:47:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599480', 'tblTempVendorCDR_20' ) start [2025-03-03 15:47:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599480', 'tblTempVendorCDR_20' ) end [2025-03-03 15:47:22] Production.INFO: ProcessCDR(1,14599480,1,1,2) [2025-03-03 15:47:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599480,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:47:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599480,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:47:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599480,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:47:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599480,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:47:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599480', 'tblTempUsageDetail_20' ) start [2025-03-03 15:47:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599480', 'tblTempUsageDetail_20' ) end [2025-03-03 15:47:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:47:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:47:27] Production.INFO: ==1705== Releasing lock... [2025-03-03 15:47:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:47:27] Production.INFO: 77 MB #Memory Used# [2025-03-03 15:48:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:48:05 [end_date_ymd] => 2025-03-03 15:48:05 [RateCDR] => 1 ) [2025-03-03 15:48:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 12:48:05' and `end` < '2025-03-03 15:48:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 15:48:19] Production.INFO: count ==6578 [2025-03-03 15:48:23] Production.ERROR: pbx CDR StartTime 2025-03-03 12:48:05 - End Time 2025-03-03 15:48:05 [2025-03-03 15:48:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:48:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599485', 'tblTempUsageDetail_20' ) start [2025-03-03 15:48:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599485', 'tblTempUsageDetail_20' ) end [2025-03-03 15:48:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599485', 'tblTempVendorCDR_20' ) start [2025-03-03 15:48:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599485', 'tblTempVendorCDR_20' ) end [2025-03-03 15:48:23] Production.INFO: ProcessCDR(1,14599485,1,1,2) [2025-03-03 15:48:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599485,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:48:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599485,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:48:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599485,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:48:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599485,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:48:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599485', 'tblTempUsageDetail_20' ) start [2025-03-03 15:48:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599485', 'tblTempUsageDetail_20' ) end [2025-03-03 15:48:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:48:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:48:28] Production.INFO: ==1834== Releasing lock... [2025-03-03 15:48:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:48:28] Production.INFO: 77.25 MB #Memory Used# [2025-03-03 15:49:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:49:05 [end_date_ymd] => 2025-03-03 15:49:05 [RateCDR] => 1 ) [2025-03-03 15: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-03 12:49:05' and `end` < '2025-03-03 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-03 15:49:19] Production.INFO: count ==6580 [2025-03-03 15:49:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:49:05 - End Time 2025-03-03 15:49:05 [2025-03-03 15:49:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:49:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599490', 'tblTempUsageDetail_20' ) start [2025-03-03 15:49:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599490', 'tblTempUsageDetail_20' ) end [2025-03-03 15:49:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599490', 'tblTempVendorCDR_20' ) start [2025-03-03 15:49:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599490', 'tblTempVendorCDR_20' ) end [2025-03-03 15:49:23] Production.INFO: ProcessCDR(1,14599490,1,1,2) [2025-03-03 15:49:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599490,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:49:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599490,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:49:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599490,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:49:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599490,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:49:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599490', 'tblTempUsageDetail_20' ) start [2025-03-03 15:49:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599490', 'tblTempUsageDetail_20' ) end [2025-03-03 15:49:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:49:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:49:28] Production.INFO: ==1921== Releasing lock... [2025-03-03 15:49:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:49:28] Production.INFO: 77.25 MB #Memory Used# [2025-03-03 15:50:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:50:06 [end_date_ymd] => 2025-03-03 15:50:06 [RateCDR] => 1 ) [2025-03-03 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-03 12:50:06' and `end` < '2025-03-03 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-03 15:50:19] Production.INFO: count ==6530 [2025-03-03 15:50:23] Production.ERROR: pbx CDR StartTime 2025-03-03 12:50:06 - End Time 2025-03-03 15:50:06 [2025-03-03 15:50:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:50:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599496', 'tblTempUsageDetail_20' ) start [2025-03-03 15:50:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599496', 'tblTempUsageDetail_20' ) end [2025-03-03 15:50:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599496', 'tblTempVendorCDR_20' ) start [2025-03-03 15:50:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599496', 'tblTempVendorCDR_20' ) end [2025-03-03 15:50:23] Production.INFO: ProcessCDR(1,14599496,1,1,2) [2025-03-03 15:50:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599496,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:50:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599496,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:50:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599496,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:50:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599496,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:50:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599496', 'tblTempUsageDetail_20' ) start [2025-03-03 15:50:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599496', 'tblTempUsageDetail_20' ) end [2025-03-03 15:50:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:50:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:50:28] Production.INFO: ==2005== Releasing lock... [2025-03-03 15:50:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:50:28] Production.INFO: 77.25 MB #Memory Used# [2025-03-03 15:51:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:51:06 [end_date_ymd] => 2025-03-03 15:51:06 [RateCDR] => 1 ) [2025-03-03 15: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-03 12:51:06' and `end` < '2025-03-03 15: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-03 15:51:19] Production.INFO: count ==6542 [2025-03-03 15:51:23] Production.ERROR: pbx CDR StartTime 2025-03-03 12:51:06 - End Time 2025-03-03 15:51:06 [2025-03-03 15:51:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:51:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599501', 'tblTempUsageDetail_20' ) start [2025-03-03 15:51:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599501', 'tblTempUsageDetail_20' ) end [2025-03-03 15:51:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599501', 'tblTempVendorCDR_20' ) start [2025-03-03 15:51:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599501', 'tblTempVendorCDR_20' ) end [2025-03-03 15:51:23] Production.INFO: ProcessCDR(1,14599501,1,1,2) [2025-03-03 15:51:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599501,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:51:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599501,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:51:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599501,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:51:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599501,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:51:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599501', 'tblTempUsageDetail_20' ) start [2025-03-03 15:51:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599501', 'tblTempUsageDetail_20' ) end [2025-03-03 15:51:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:51:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:51:28] Production.INFO: ==2093== Releasing lock... [2025-03-03 15:51:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:51:28] Production.INFO: 77 MB #Memory Used# [2025-03-03 15:52:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:52:05 [end_date_ymd] => 2025-03-03 15:52:05 [RateCDR] => 1 ) [2025-03-03 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-03 12:52:05' and `end` < '2025-03-03 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-03 15:52:19] Production.INFO: count ==6566 [2025-03-03 15:52:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:52:05 - End Time 2025-03-03 15:52:05 [2025-03-03 15:52:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:52:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599506', 'tblTempUsageDetail_20' ) start [2025-03-03 15:52:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599506', 'tblTempUsageDetail_20' ) end [2025-03-03 15:52:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599506', 'tblTempVendorCDR_20' ) start [2025-03-03 15:52:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599506', 'tblTempVendorCDR_20' ) end [2025-03-03 15:52:22] Production.INFO: ProcessCDR(1,14599506,1,1,2) [2025-03-03 15:52:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599506,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:52:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599506,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:52:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599506,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:52:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599506,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:52:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599506', 'tblTempUsageDetail_20' ) start [2025-03-03 15:52:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599506', 'tblTempUsageDetail_20' ) end [2025-03-03 15:52:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:52:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:52:27] Production.INFO: ==2179== Releasing lock... [2025-03-03 15:52:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:52:27] Production.INFO: 77.25 MB #Memory Used# [2025-03-03 15:53:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:53:06 [end_date_ymd] => 2025-03-03 15:53:06 [RateCDR] => 1 ) [2025-03-03 15: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-03 12:53:06' and `end` < '2025-03-03 15: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-03 15:53:19] Production.INFO: count ==6584 [2025-03-03 15:53:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:53:06 - End Time 2025-03-03 15:53:06 [2025-03-03 15:53:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:53:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599511', 'tblTempUsageDetail_20' ) start [2025-03-03 15:53:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599511', 'tblTempUsageDetail_20' ) end [2025-03-03 15:53:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599511', 'tblTempVendorCDR_20' ) start [2025-03-03 15:53:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599511', 'tblTempVendorCDR_20' ) end [2025-03-03 15:53:23] Production.INFO: ProcessCDR(1,14599511,1,1,2) [2025-03-03 15:53:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599511,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:53:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599511,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:53:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599511,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:53:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599511,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:53:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599511', 'tblTempUsageDetail_20' ) start [2025-03-03 15:53:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599511', 'tblTempUsageDetail_20' ) end [2025-03-03 15:53:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:53:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:53:28] Production.INFO: ==2264== Releasing lock... [2025-03-03 15:53:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:53:28] Production.INFO: 77.25 MB #Memory Used# [2025-03-03 15:54:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:54:06 [end_date_ymd] => 2025-03-03 15:54:06 [RateCDR] => 1 ) [2025-03-03 15:54:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 12:54:06' and `end` < '2025-03-03 15:54:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 15:54:19] Production.INFO: count ==6588 [2025-03-03 15:54:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:54:06 - End Time 2025-03-03 15:54:06 [2025-03-03 15:54:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:54:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599516', 'tblTempUsageDetail_20' ) start [2025-03-03 15:54:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599516', 'tblTempUsageDetail_20' ) end [2025-03-03 15:54:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599516', 'tblTempVendorCDR_20' ) start [2025-03-03 15:54:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599516', 'tblTempVendorCDR_20' ) end [2025-03-03 15:54:23] Production.INFO: ProcessCDR(1,14599516,1,1,2) [2025-03-03 15:54:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599516,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:54:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599516,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:54:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599516,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:54:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599516,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:54:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599516', 'tblTempUsageDetail_20' ) start [2025-03-03 15:54:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599516', 'tblTempUsageDetail_20' ) end [2025-03-03 15:54:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:54:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:54:28] Production.INFO: ==2355== Releasing lock... [2025-03-03 15:54:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:54:28] Production.INFO: 77.25 MB #Memory Used# [2025-03-03 15:55:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:55:06 [end_date_ymd] => 2025-03-03 15:55:06 [RateCDR] => 1 ) [2025-03-03 15: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-03 12:55:06' and `end` < '2025-03-03 15: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-03 15:55:19] Production.INFO: count ==6565 [2025-03-03 15:55:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:55:06 - End Time 2025-03-03 15:55:06 [2025-03-03 15:55:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:55:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599521', 'tblTempUsageDetail_20' ) start [2025-03-03 15:55:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599521', 'tblTempUsageDetail_20' ) end [2025-03-03 15:55:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599521', 'tblTempVendorCDR_20' ) start [2025-03-03 15:55:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599521', 'tblTempVendorCDR_20' ) end [2025-03-03 15:55:23] Production.INFO: ProcessCDR(1,14599521,1,1,2) [2025-03-03 15:55:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599521,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:55:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599521,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:55:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599521,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:55:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599521,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:55:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599521', 'tblTempUsageDetail_20' ) start [2025-03-03 15:55:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599521', 'tblTempUsageDetail_20' ) end [2025-03-03 15:55:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:55:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:55:26] Production.INFO: ==2446== Releasing lock... [2025-03-03 15:55:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:55:26] Production.INFO: 77.25 MB #Memory Used# [2025-03-03 15:56:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:56:05 [end_date_ymd] => 2025-03-03 15:56:05 [RateCDR] => 1 ) [2025-03-03 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-03 12:56:05' and `end` < '2025-03-03 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-03 15:56:19] Production.INFO: count ==6568 [2025-03-03 15:56:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:56:05 - End Time 2025-03-03 15:56:05 [2025-03-03 15:56:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:56:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599526', 'tblTempUsageDetail_20' ) start [2025-03-03 15:56:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599526', 'tblTempUsageDetail_20' ) end [2025-03-03 15:56:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599526', 'tblTempVendorCDR_20' ) start [2025-03-03 15:56:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599526', 'tblTempVendorCDR_20' ) end [2025-03-03 15:56:22] Production.INFO: ProcessCDR(1,14599526,1,1,2) [2025-03-03 15:56:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599526,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:56:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599526,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:56:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599526,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:56:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599526,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:56:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599526', 'tblTempUsageDetail_20' ) start [2025-03-03 15:56:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599526', 'tblTempUsageDetail_20' ) end [2025-03-03 15:56:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:56:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:56:27] Production.INFO: ==2530== Releasing lock... [2025-03-03 15:56:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:56:27] Production.INFO: 77.25 MB #Memory Used# [2025-03-03 15:57:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:57:06 [end_date_ymd] => 2025-03-03 15:57:06 [RateCDR] => 1 ) [2025-03-03 15: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-03 12:57:06' and `end` < '2025-03-03 15: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-03 15:57:20] Production.INFO: count ==6601 [2025-03-03 15:57:23] Production.ERROR: pbx CDR StartTime 2025-03-03 12:57:06 - End Time 2025-03-03 15:57:06 [2025-03-03 15:57:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:57:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599531', 'tblTempUsageDetail_20' ) start [2025-03-03 15:57:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599531', 'tblTempUsageDetail_20' ) end [2025-03-03 15:57:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599531', 'tblTempVendorCDR_20' ) start [2025-03-03 15:57:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599531', 'tblTempVendorCDR_20' ) end [2025-03-03 15:57:23] Production.INFO: ProcessCDR(1,14599531,1,1,2) [2025-03-03 15:57:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599531,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:57:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599531,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:57:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599531,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:57:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599531,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:57:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599531', 'tblTempUsageDetail_20' ) start [2025-03-03 15:57:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599531', 'tblTempUsageDetail_20' ) end [2025-03-03 15:57:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:57:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:57:28] Production.INFO: ==2615== Releasing lock... [2025-03-03 15:57:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:57:28] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 15:58:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:58:05 [end_date_ymd] => 2025-03-03 15:58:05 [RateCDR] => 1 ) [2025-03-03 15:58:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 12:58:05' and `end` < '2025-03-03 15:58:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 15:58:19] Production.INFO: count ==6610 [2025-03-03 15:58:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:58:05 - End Time 2025-03-03 15:58:05 [2025-03-03 15:58:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:58:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599536', 'tblTempUsageDetail_20' ) start [2025-03-03 15:58:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599536', 'tblTempUsageDetail_20' ) end [2025-03-03 15:58:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599536', 'tblTempVendorCDR_20' ) start [2025-03-03 15:58:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599536', 'tblTempVendorCDR_20' ) end [2025-03-03 15:58:22] Production.INFO: ProcessCDR(1,14599536,1,1,2) [2025-03-03 15:58:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599536,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:58:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599536,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:58:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599536,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:58:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599536,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:58:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599536', 'tblTempUsageDetail_20' ) start [2025-03-03 15:58:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599536', 'tblTempUsageDetail_20' ) end [2025-03-03 15:58:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:58:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:58:27] Production.INFO: ==2696== Releasing lock... [2025-03-03 15:58:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:58:27] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 15:59:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 12:59:05 [end_date_ymd] => 2025-03-03 15:59:05 [RateCDR] => 1 ) [2025-03-03 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-03 12:59:05' and `end` < '2025-03-03 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-03 15:59:19] Production.INFO: count ==6629 [2025-03-03 15:59:22] Production.ERROR: pbx CDR StartTime 2025-03-03 12:59:05 - End Time 2025-03-03 15:59:05 [2025-03-03 15:59:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 15:59:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599541', 'tblTempUsageDetail_20' ) start [2025-03-03 15:59:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599541', 'tblTempUsageDetail_20' ) end [2025-03-03 15:59:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599541', 'tblTempVendorCDR_20' ) start [2025-03-03 15:59:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599541', 'tblTempVendorCDR_20' ) end [2025-03-03 15:59:22] Production.INFO: ProcessCDR(1,14599541,1,1,2) [2025-03-03 15:59:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599541,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:59:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599541,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 15:59:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599541,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:59:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599541,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 15:59:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599541', 'tblTempUsageDetail_20' ) start [2025-03-03 15:59:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599541', 'tblTempUsageDetail_20' ) end [2025-03-03 15:59:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 15:59:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 15:59:27] Production.INFO: ==2782== Releasing lock... [2025-03-03 15:59:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 15:59:27] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 16:00:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:00:06 [end_date_ymd] => 2025-03-03 16:00:06 [RateCDR] => 1 ) [2025-03-03 16:00:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 13:00:06' and `end` < '2025-03-03 16:00:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 16:00:19] Production.INFO: count ==6630 [2025-03-03 16:00:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:00:06 - End Time 2025-03-03 16:00:06 [2025-03-03 16:00:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:00:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599546', 'tblTempUsageDetail_20' ) start [2025-03-03 16:00:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599546', 'tblTempUsageDetail_20' ) end [2025-03-03 16:00:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599546', 'tblTempVendorCDR_20' ) start [2025-03-03 16:00:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599546', 'tblTempVendorCDR_20' ) end [2025-03-03 16:00:23] Production.INFO: ProcessCDR(1,14599546,1,1,2) [2025-03-03 16:00:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599546,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:00:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599546,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:00:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599546,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:00:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599546,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:00:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599546', 'tblTempUsageDetail_20' ) start [2025-03-03 16:00:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599546', 'tblTempUsageDetail_20' ) end [2025-03-03 16:00:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:00:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:00:28] Production.INFO: ==2869== Releasing lock... [2025-03-03 16:00:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:00:28] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 16:01:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:01:05 [end_date_ymd] => 2025-03-03 16:01:05 [RateCDR] => 1 ) [2025-03-03 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-03 13:01:05' and `end` < '2025-03-03 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-03 16:01:19] Production.INFO: count ==6614 [2025-03-03 16:01:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:01:05 - End Time 2025-03-03 16:01:05 [2025-03-03 16:01:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:01:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599552', 'tblTempUsageDetail_20' ) start [2025-03-03 16:01:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599552', 'tblTempUsageDetail_20' ) end [2025-03-03 16:01:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599552', 'tblTempVendorCDR_20' ) start [2025-03-03 16:01:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599552', 'tblTempVendorCDR_20' ) end [2025-03-03 16:01:22] Production.INFO: ProcessCDR(1,14599552,1,1,2) [2025-03-03 16:01:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599552,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:01:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599552,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:01:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599552,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:01:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599552,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:01:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599552', 'tblTempUsageDetail_20' ) start [2025-03-03 16:01:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599552', 'tblTempUsageDetail_20' ) end [2025-03-03 16:01:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:01:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:01:27] Production.INFO: ==2968== Releasing lock... [2025-03-03 16:01:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:01:27] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 16:02:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:02:05 [end_date_ymd] => 2025-03-03 16:02:05 [RateCDR] => 1 ) [2025-03-03 16:02:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 13:02:05' and `end` < '2025-03-03 16:02:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 16:02:19] Production.INFO: count ==6628 [2025-03-03 16:02:23] Production.ERROR: pbx CDR StartTime 2025-03-03 13:02:05 - End Time 2025-03-03 16:02:05 [2025-03-03 16:02:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:02:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599557', 'tblTempUsageDetail_20' ) start [2025-03-03 16:02:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599557', 'tblTempUsageDetail_20' ) end [2025-03-03 16:02:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599557', 'tblTempVendorCDR_20' ) start [2025-03-03 16:02:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599557', 'tblTempVendorCDR_20' ) end [2025-03-03 16:02:23] Production.INFO: ProcessCDR(1,14599557,1,1,2) [2025-03-03 16:02:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599557,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:02:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599557,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:02:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599557,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:02:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599557,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:02:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599557', 'tblTempUsageDetail_20' ) start [2025-03-03 16:02:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599557', 'tblTempUsageDetail_20' ) end [2025-03-03 16:02:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:02:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:02:28] Production.INFO: ==3051== Releasing lock... [2025-03-03 16:02:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:02:28] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 16:03:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:03:05 [end_date_ymd] => 2025-03-03 16:03:05 [RateCDR] => 1 ) [2025-03-03 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-03 13:03:05' and `end` < '2025-03-03 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-03 16:03:19] Production.INFO: count ==6648 [2025-03-03 16:03:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:03:05 - End Time 2025-03-03 16:03:05 [2025-03-03 16:03:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:03:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599562', 'tblTempUsageDetail_20' ) start [2025-03-03 16:03:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599562', 'tblTempUsageDetail_20' ) end [2025-03-03 16:03:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599562', 'tblTempVendorCDR_20' ) start [2025-03-03 16:03:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599562', 'tblTempVendorCDR_20' ) end [2025-03-03 16:03:23] Production.INFO: ProcessCDR(1,14599562,1,1,2) [2025-03-03 16:03:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599562,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:03:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599562,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:03:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599562,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:03:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599562,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:03:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599562', 'tblTempUsageDetail_20' ) start [2025-03-03 16:03:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599562', 'tblTempUsageDetail_20' ) end [2025-03-03 16:03:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:03:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:03:27] Production.INFO: ==3136== Releasing lock... [2025-03-03 16:03:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:03:27] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 16:04:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:04:04 [end_date_ymd] => 2025-03-03 16:04:04 [RateCDR] => 1 ) [2025-03-03 16:04:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 13:04:04' and `end` < '2025-03-03 16:04:04' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 16:04:18] Production.INFO: count ==6666 [2025-03-03 16:04:21] Production.ERROR: pbx CDR StartTime 2025-03-03 13:04:04 - End Time 2025-03-03 16:04:04 [2025-03-03 16:04:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:04:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599567', 'tblTempUsageDetail_20' ) start [2025-03-03 16:04:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599567', 'tblTempUsageDetail_20' ) end [2025-03-03 16:04:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599567', 'tblTempVendorCDR_20' ) start [2025-03-03 16:04:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599567', 'tblTempVendorCDR_20' ) end [2025-03-03 16:04:22] Production.INFO: ProcessCDR(1,14599567,1,1,2) [2025-03-03 16:04:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599567,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:04:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599567,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:04:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599567,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:04:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599567,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:04:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599567', 'tblTempUsageDetail_20' ) start [2025-03-03 16:04:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599567', 'tblTempUsageDetail_20' ) end [2025-03-03 16:04:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:04:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:04:27] Production.INFO: ==3259== Releasing lock... [2025-03-03 16:04:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:04:27] Production.INFO: 78 MB #Memory Used# [2025-03-03 16:05:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:05:05 [end_date_ymd] => 2025-03-03 16:05:05 [RateCDR] => 1 ) [2025-03-03 16:05:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 13:05:05' and `end` < '2025-03-03 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-03 16:05:19] Production.INFO: count ==6665 [2025-03-03 16:05:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:05:05 - End Time 2025-03-03 16:05:05 [2025-03-03 16:05:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:05:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599572', 'tblTempUsageDetail_20' ) start [2025-03-03 16:05:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599572', 'tblTempUsageDetail_20' ) end [2025-03-03 16:05:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599572', 'tblTempVendorCDR_20' ) start [2025-03-03 16:05:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599572', 'tblTempVendorCDR_20' ) end [2025-03-03 16:05:22] Production.INFO: ProcessCDR(1,14599572,1,1,2) [2025-03-03 16:05:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599572,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:05:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599572,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:05:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599572,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:05:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599572,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:05:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599572', 'tblTempUsageDetail_20' ) start [2025-03-03 16:05:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599572', 'tblTempUsageDetail_20' ) end [2025-03-03 16:05:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:05:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:05:27] Production.INFO: ==3346== Releasing lock... [2025-03-03 16:05:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:05:27] Production.INFO: 78 MB #Memory Used# [2025-03-03 16:06:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:06:06 [end_date_ymd] => 2025-03-03 16:06:06 [RateCDR] => 1 ) [2025-03-03 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-03 13:06:06' and `end` < '2025-03-03 16:06:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 16:06:20] Production.INFO: count ==6657 [2025-03-03 16:06:23] Production.ERROR: pbx CDR StartTime 2025-03-03 13:06:06 - End Time 2025-03-03 16:06:06 [2025-03-03 16:06:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:06:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599577', 'tblTempUsageDetail_20' ) start [2025-03-03 16:06:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599577', 'tblTempUsageDetail_20' ) end [2025-03-03 16:06:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599577', 'tblTempVendorCDR_20' ) start [2025-03-03 16:06:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599577', 'tblTempVendorCDR_20' ) end [2025-03-03 16:06:23] Production.INFO: ProcessCDR(1,14599577,1,1,2) [2025-03-03 16:06:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599577,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:06:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599577,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:06:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599577,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:06:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599577,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:06:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599577', 'tblTempUsageDetail_20' ) start [2025-03-03 16:06:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599577', 'tblTempUsageDetail_20' ) end [2025-03-03 16:06:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:06:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:06:28] Production.INFO: ==3429== Releasing lock... [2025-03-03 16:06:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:06:28] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 16:07:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:07:05 [end_date_ymd] => 2025-03-03 16:07:05 [RateCDR] => 1 ) [2025-03-03 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-03 13:07:05' and `end` < '2025-03-03 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-03 16:07:19] Production.INFO: count ==6643 [2025-03-03 16:07:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:07:05 - End Time 2025-03-03 16:07:05 [2025-03-03 16:07:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:07:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599582', 'tblTempUsageDetail_20' ) start [2025-03-03 16:07:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599582', 'tblTempUsageDetail_20' ) end [2025-03-03 16:07:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599582', 'tblTempVendorCDR_20' ) start [2025-03-03 16:07:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599582', 'tblTempVendorCDR_20' ) end [2025-03-03 16:07:22] Production.INFO: ProcessCDR(1,14599582,1,1,2) [2025-03-03 16:07:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599582,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:07:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599582,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:07:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599582,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:07:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599582,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:07:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599582', 'tblTempUsageDetail_20' ) start [2025-03-03 16:07:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599582', 'tblTempUsageDetail_20' ) end [2025-03-03 16:07:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:07:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:07:28] Production.INFO: ==3515== Releasing lock... [2025-03-03 16:07:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:07:28] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 16:08:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:08:06 [end_date_ymd] => 2025-03-03 16:08:06 [RateCDR] => 1 ) [2025-03-03 16: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-03 13:08:06' and `end` < '2025-03-03 16: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-03 16:08:19] Production.INFO: count ==6657 [2025-03-03 16:08:23] Production.ERROR: pbx CDR StartTime 2025-03-03 13:08:06 - End Time 2025-03-03 16:08:06 [2025-03-03 16:08:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:08:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599587', 'tblTempUsageDetail_20' ) start [2025-03-03 16:08:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599587', 'tblTempUsageDetail_20' ) end [2025-03-03 16:08:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599587', 'tblTempVendorCDR_20' ) start [2025-03-03 16:08:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599587', 'tblTempVendorCDR_20' ) end [2025-03-03 16:08:23] Production.INFO: ProcessCDR(1,14599587,1,1,2) [2025-03-03 16:08:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599587,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:08:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599587,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:08:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599587,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:08:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599587,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:08:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599587', 'tblTempUsageDetail_20' ) start [2025-03-03 16:08:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599587', 'tblTempUsageDetail_20' ) end [2025-03-03 16:08:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:08:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:08:28] Production.INFO: ==3602== Releasing lock... [2025-03-03 16:08:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:08:28] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 16:09:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:09:05 [end_date_ymd] => 2025-03-03 16:09:05 [RateCDR] => 1 ) [2025-03-03 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-03 13:09:05' and `end` < '2025-03-03 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-03 16:09:18] Production.INFO: count ==6658 [2025-03-03 16:09:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:09:05 - End Time 2025-03-03 16:09:05 [2025-03-03 16:09:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:09:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599592', 'tblTempUsageDetail_20' ) start [2025-03-03 16:09:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599592', 'tblTempUsageDetail_20' ) end [2025-03-03 16:09:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599592', 'tblTempVendorCDR_20' ) start [2025-03-03 16:09:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599592', 'tblTempVendorCDR_20' ) end [2025-03-03 16:09:22] Production.INFO: ProcessCDR(1,14599592,1,1,2) [2025-03-03 16:09:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599592,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:09:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599592,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:09:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599592,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:09:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599592,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:09:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599592', 'tblTempUsageDetail_20' ) start [2025-03-03 16:09:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599592', 'tblTempUsageDetail_20' ) end [2025-03-03 16:09:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:09:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:09:27] Production.INFO: ==3686== Releasing lock... [2025-03-03 16:09:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:09:27] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 16:10:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:10:07 [end_date_ymd] => 2025-03-03 16:10:07 [RateCDR] => 1 ) [2025-03-03 16:10:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 13:10:07' and `end` < '2025-03-03 16:10:07' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 16:10:20] Production.INFO: count ==6655 [2025-03-03 16:10:23] Production.ERROR: pbx CDR StartTime 2025-03-03 13:10:07 - End Time 2025-03-03 16:10:07 [2025-03-03 16:10:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:10:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599598', 'tblTempUsageDetail_20' ) start [2025-03-03 16:10:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599598', 'tblTempUsageDetail_20' ) end [2025-03-03 16:10:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599598', 'tblTempVendorCDR_20' ) start [2025-03-03 16:10:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599598', 'tblTempVendorCDR_20' ) end [2025-03-03 16:10:24] Production.INFO: ProcessCDR(1,14599598,1,1,2) [2025-03-03 16:10:24] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599598,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:10:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599598,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:10:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599598,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:10:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599598,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:10:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599598', 'tblTempUsageDetail_20' ) start [2025-03-03 16:10:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599598', 'tblTempUsageDetail_20' ) end [2025-03-03 16:10:29] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:10:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:10:29] Production.INFO: ==3771== Releasing lock... [2025-03-03 16:10:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:10:29] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 16:11:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:11:05 [end_date_ymd] => 2025-03-03 16:11:05 [RateCDR] => 1 ) [2025-03-03 16:11:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 13:11:05' and `end` < '2025-03-03 16:11:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 16:11:19] Production.INFO: count ==6676 [2025-03-03 16:11:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:11:05 - End Time 2025-03-03 16:11:05 [2025-03-03 16:11:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:11:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599603', 'tblTempUsageDetail_20' ) start [2025-03-03 16:11:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599603', 'tblTempUsageDetail_20' ) end [2025-03-03 16:11:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599603', 'tblTempVendorCDR_20' ) start [2025-03-03 16:11:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599603', 'tblTempVendorCDR_20' ) end [2025-03-03 16:11:22] Production.INFO: ProcessCDR(1,14599603,1,1,2) [2025-03-03 16:11:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599603,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:11:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599603,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:11:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599603,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:11:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599603,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:11:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599603', 'tblTempUsageDetail_20' ) start [2025-03-03 16:11:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599603', 'tblTempUsageDetail_20' ) end [2025-03-03 16:11:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:11:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:11:28] Production.INFO: ==3857== Releasing lock... [2025-03-03 16:11:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:11:28] Production.INFO: 78 MB #Memory Used# [2025-03-03 16:12:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:12:05 [end_date_ymd] => 2025-03-03 16:12:05 [RateCDR] => 1 ) [2025-03-03 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-03 13:12:05' and `end` < '2025-03-03 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-03 16:12:19] Production.INFO: count ==6674 [2025-03-03 16:12:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:12:05 - End Time 2025-03-03 16:12:05 [2025-03-03 16:12:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:12:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599608', 'tblTempUsageDetail_20' ) start [2025-03-03 16:12:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599608', 'tblTempUsageDetail_20' ) end [2025-03-03 16:12:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599608', 'tblTempVendorCDR_20' ) start [2025-03-03 16:12:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599608', 'tblTempVendorCDR_20' ) end [2025-03-03 16:12:22] Production.INFO: ProcessCDR(1,14599608,1,1,2) [2025-03-03 16:12:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599608,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:12:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599608,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:12:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599608,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:12:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599608,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:12:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599608', 'tblTempUsageDetail_20' ) start [2025-03-03 16:12:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599608', 'tblTempUsageDetail_20' ) end [2025-03-03 16:12:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:12:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:12:27] Production.INFO: ==3942== Releasing lock... [2025-03-03 16:12:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:12:27] Production.INFO: 78 MB #Memory Used# [2025-03-03 16:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:13:04 [end_date_ymd] => 2025-03-03 16:13:04 [RateCDR] => 1 ) [2025-03-03 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-03 13:13:04' and `end` < '2025-03-03 16: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-03 16:13:18] Production.INFO: count ==6660 [2025-03-03 16:13:21] Production.ERROR: pbx CDR StartTime 2025-03-03 13:13:04 - End Time 2025-03-03 16:13:04 [2025-03-03 16:13:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:13:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599613', 'tblTempUsageDetail_20' ) start [2025-03-03 16:13:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599613', 'tblTempUsageDetail_20' ) end [2025-03-03 16:13:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599613', 'tblTempVendorCDR_20' ) start [2025-03-03 16:13:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599613', 'tblTempVendorCDR_20' ) end [2025-03-03 16:13:22] Production.INFO: ProcessCDR(1,14599613,1,1,2) [2025-03-03 16:13:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599613,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:13:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599613,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:13:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599613,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:13:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599613,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:13:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599613', 'tblTempUsageDetail_20' ) start [2025-03-03 16:13:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599613', 'tblTempUsageDetail_20' ) end [2025-03-03 16:13:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:13:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:13:27] Production.INFO: ==4034== Releasing lock... [2025-03-03 16:13:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:13:27] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 16:14:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:14:06 [end_date_ymd] => 2025-03-03 16:14:06 [RateCDR] => 1 ) [2025-03-03 16:14:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 13:14:06' and `end` < '2025-03-03 16:14:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 16:14:19] Production.INFO: count ==6681 [2025-03-03 16:14:23] Production.ERROR: pbx CDR StartTime 2025-03-03 13:14:06 - End Time 2025-03-03 16:14:06 [2025-03-03 16:14:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:14:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599618', 'tblTempUsageDetail_20' ) start [2025-03-03 16:14:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599618', 'tblTempUsageDetail_20' ) end [2025-03-03 16:14:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599618', 'tblTempVendorCDR_20' ) start [2025-03-03 16:14:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599618', 'tblTempVendorCDR_20' ) end [2025-03-03 16:14:23] Production.INFO: ProcessCDR(1,14599618,1,1,2) [2025-03-03 16:14:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599618,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:14:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599618,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:14:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599618,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:14:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599618,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:14:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599618', 'tblTempUsageDetail_20' ) start [2025-03-03 16:14:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599618', 'tblTempUsageDetail_20' ) end [2025-03-03 16:14:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:14:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:14:28] Production.INFO: ==4117== Releasing lock... [2025-03-03 16:14:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:14:28] Production.INFO: 78 MB #Memory Used# [2025-03-03 16:15:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:15:05 [end_date_ymd] => 2025-03-03 16:15:05 [RateCDR] => 1 ) [2025-03-03 16:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 13:15:05' and `end` < '2025-03-03 16:15:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 16:15:18] Production.INFO: count ==6678 [2025-03-03 16:15:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:15:05 - End Time 2025-03-03 16:15:05 [2025-03-03 16:15:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:15:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599623', 'tblTempUsageDetail_20' ) start [2025-03-03 16:15:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599623', 'tblTempUsageDetail_20' ) end [2025-03-03 16:15:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599623', 'tblTempVendorCDR_20' ) start [2025-03-03 16:15:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599623', 'tblTempVendorCDR_20' ) end [2025-03-03 16:15:22] Production.INFO: ProcessCDR(1,14599623,1,1,2) [2025-03-03 16:15:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599623,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:15:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599623,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:15:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599623,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:15:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599623,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:15:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599623', 'tblTempUsageDetail_20' ) start [2025-03-03 16:15:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599623', 'tblTempUsageDetail_20' ) end [2025-03-03 16:15:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:15:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:15:27] Production.INFO: ==4202== Releasing lock... [2025-03-03 16:15:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:15:27] Production.INFO: 78 MB #Memory Used# [2025-03-03 16:16:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:16:05 [end_date_ymd] => 2025-03-03 16:16:05 [RateCDR] => 1 ) [2025-03-03 16:16:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 13:16:05' and `end` < '2025-03-03 16:16:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 16:16:19] Production.INFO: count ==6677 [2025-03-03 16:16:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:16:05 - End Time 2025-03-03 16:16:05 [2025-03-03 16:16:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:16:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599628', 'tblTempUsageDetail_20' ) start [2025-03-03 16:16:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599628', 'tblTempUsageDetail_20' ) end [2025-03-03 16:16:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599628', 'tblTempVendorCDR_20' ) start [2025-03-03 16:16:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599628', 'tblTempVendorCDR_20' ) end [2025-03-03 16:16:22] Production.INFO: ProcessCDR(1,14599628,1,1,2) [2025-03-03 16:16:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599628,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:16:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599628,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:16:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599628,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:16:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599628,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:16:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599628', 'tblTempUsageDetail_20' ) start [2025-03-03 16:16:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599628', 'tblTempUsageDetail_20' ) end [2025-03-03 16:16:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:16:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:16:27] Production.INFO: ==4288== Releasing lock... [2025-03-03 16:16:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:16:27] Production.INFO: 78 MB #Memory Used# [2025-03-03 16:17:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:17:05 [end_date_ymd] => 2025-03-03 16:17:05 [RateCDR] => 1 ) [2025-03-03 16:17:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 13:17:05' and `end` < '2025-03-03 16:17:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 16:17:19] Production.INFO: count ==6691 [2025-03-03 16:17:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:17:05 - End Time 2025-03-03 16:17:05 [2025-03-03 16:17:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:17:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599633', 'tblTempUsageDetail_20' ) start [2025-03-03 16:17:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599633', 'tblTempUsageDetail_20' ) end [2025-03-03 16:17:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599633', 'tblTempVendorCDR_20' ) start [2025-03-03 16:17:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599633', 'tblTempVendorCDR_20' ) end [2025-03-03 16:17:23] Production.INFO: ProcessCDR(1,14599633,1,1,2) [2025-03-03 16:17:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599633,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:17:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599633,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:17:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599633,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:17:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599633,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:17:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599633', 'tblTempUsageDetail_20' ) start [2025-03-03 16:17:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599633', 'tblTempUsageDetail_20' ) end [2025-03-03 16:17:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:17:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:17:28] Production.INFO: ==4375== Releasing lock... [2025-03-03 16:17:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:17:28] Production.INFO: 78 MB #Memory Used# [2025-03-03 16:18:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:18:05 [end_date_ymd] => 2025-03-03 16:18:05 [RateCDR] => 1 ) [2025-03-03 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-03 13:18:05' and `end` < '2025-03-03 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-03 16:18:18] Production.INFO: count ==6680 [2025-03-03 16:18:21] Production.ERROR: pbx CDR StartTime 2025-03-03 13:18:05 - End Time 2025-03-03 16:18:05 [2025-03-03 16:18:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:18:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599638', 'tblTempUsageDetail_20' ) start [2025-03-03 16:18:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599638', 'tblTempUsageDetail_20' ) end [2025-03-03 16:18:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599638', 'tblTempVendorCDR_20' ) start [2025-03-03 16:18:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599638', 'tblTempVendorCDR_20' ) end [2025-03-03 16:18:22] Production.INFO: ProcessCDR(1,14599638,1,1,2) [2025-03-03 16:18:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599638,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:18:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599638,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:18:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599638,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:18:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599638,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:18:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599638', 'tblTempUsageDetail_20' ) start [2025-03-03 16:18:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599638', 'tblTempUsageDetail_20' ) end [2025-03-03 16:18:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:18:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:18:27] Production.INFO: ==4469== Releasing lock... [2025-03-03 16:18:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:18:27] Production.INFO: 78 MB #Memory Used# [2025-03-03 16:19:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:19:06 [end_date_ymd] => 2025-03-03 16:19:06 [RateCDR] => 1 ) [2025-03-03 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-03 13:19:06' and `end` < '2025-03-03 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-03 16:19:20] Production.INFO: count ==6664 [2025-03-03 16:19:23] Production.ERROR: pbx CDR StartTime 2025-03-03 13:19:06 - End Time 2025-03-03 16:19:06 [2025-03-03 16:19:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:19:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599643', 'tblTempUsageDetail_20' ) start [2025-03-03 16:19:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599643', 'tblTempUsageDetail_20' ) end [2025-03-03 16:19:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599643', 'tblTempVendorCDR_20' ) start [2025-03-03 16:19:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599643', 'tblTempVendorCDR_20' ) end [2025-03-03 16:19:23] Production.INFO: ProcessCDR(1,14599643,1,1,2) [2025-03-03 16:19:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599643,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:19:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599643,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:19:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599643,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:19:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599643,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:19:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599643', 'tblTempUsageDetail_20' ) start [2025-03-03 16:19:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599643', 'tblTempUsageDetail_20' ) end [2025-03-03 16:19:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:19:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:19:28] Production.INFO: ==4601== Releasing lock... [2025-03-03 16:19:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:19:28] Production.INFO: 78 MB #Memory Used# [2025-03-03 16:20:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:20:06 [end_date_ymd] => 2025-03-03 16:20:06 [RateCDR] => 1 ) [2025-03-03 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-03 13:20:06' and `end` < '2025-03-03 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-03 16:20:19] Production.INFO: count ==6646 [2025-03-03 16:20:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:20:06 - End Time 2025-03-03 16:20:06 [2025-03-03 16:20:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:20:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599649', 'tblTempUsageDetail_20' ) start [2025-03-03 16:20:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599649', 'tblTempUsageDetail_20' ) end [2025-03-03 16:20:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599649', 'tblTempVendorCDR_20' ) start [2025-03-03 16:20:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599649', 'tblTempVendorCDR_20' ) end [2025-03-03 16:20:23] Production.INFO: ProcessCDR(1,14599649,1,1,2) [2025-03-03 16:20:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599649,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:20:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599649,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:20:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599649,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:20:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599649,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:20:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599649', 'tblTempUsageDetail_20' ) start [2025-03-03 16:20:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599649', 'tblTempUsageDetail_20' ) end [2025-03-03 16:20:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:20:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:20:27] Production.INFO: ==4690== Releasing lock... [2025-03-03 16:20:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:20:27] Production.INFO: 77.75 MB #Memory Used# [2025-03-03 16:21:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:21:06 [end_date_ymd] => 2025-03-03 16:21:06 [RateCDR] => 1 ) [2025-03-03 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-03 13:21:06' and `end` < '2025-03-03 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-03 16:21:19] Production.INFO: count ==6607 [2025-03-03 16:21:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:21:06 - End Time 2025-03-03 16:21:06 [2025-03-03 16:21:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:21:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599654', 'tblTempUsageDetail_20' ) start [2025-03-03 16:21:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599654', 'tblTempUsageDetail_20' ) end [2025-03-03 16:21:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599654', 'tblTempVendorCDR_20' ) start [2025-03-03 16:21:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599654', 'tblTempVendorCDR_20' ) end [2025-03-03 16:21:23] Production.INFO: ProcessCDR(1,14599654,1,1,2) [2025-03-03 16:21:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599654,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:21:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599654,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:21:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599654,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:21:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599654,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:21:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599654', 'tblTempUsageDetail_20' ) start [2025-03-03 16:21:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599654', 'tblTempUsageDetail_20' ) end [2025-03-03 16:21:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:21:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:21:27] Production.INFO: ==4775== Releasing lock... [2025-03-03 16:21:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:21:27] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 16:22:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:22:05 [end_date_ymd] => 2025-03-03 16:22:05 [RateCDR] => 1 ) [2025-03-03 16:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 13:22:05' and `end` < '2025-03-03 16:22:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 16:22:20] Production.INFO: count ==6606 [2025-03-03 16:22:23] Production.ERROR: pbx CDR StartTime 2025-03-03 13:22:05 - End Time 2025-03-03 16:22:05 [2025-03-03 16:22:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:22:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599659', 'tblTempUsageDetail_20' ) start [2025-03-03 16:22:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599659', 'tblTempUsageDetail_20' ) end [2025-03-03 16:22:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599659', 'tblTempVendorCDR_20' ) start [2025-03-03 16:22:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599659', 'tblTempVendorCDR_20' ) end [2025-03-03 16:22:23] Production.INFO: ProcessCDR(1,14599659,1,1,2) [2025-03-03 16:22:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599659,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:22:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599659,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:22:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599659,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:22:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599659,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:22:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599659', 'tblTempUsageDetail_20' ) start [2025-03-03 16:22:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599659', 'tblTempUsageDetail_20' ) end [2025-03-03 16:22:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:22:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:22:28] Production.INFO: ==4859== Releasing lock... [2025-03-03 16:22:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:22:28] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 16:23:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:23:06 [end_date_ymd] => 2025-03-03 16:23:06 [RateCDR] => 1 ) [2025-03-03 16:23:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 13:23:06' and `end` < '2025-03-03 16:23:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 16:23:19] Production.INFO: count ==6603 [2025-03-03 16:23:23] Production.ERROR: pbx CDR StartTime 2025-03-03 13:23:06 - End Time 2025-03-03 16:23:06 [2025-03-03 16:23:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:23:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599664', 'tblTempUsageDetail_20' ) start [2025-03-03 16:23:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599664', 'tblTempUsageDetail_20' ) end [2025-03-03 16:23:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599664', 'tblTempVendorCDR_20' ) start [2025-03-03 16:23:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599664', 'tblTempVendorCDR_20' ) end [2025-03-03 16:23:23] Production.INFO: ProcessCDR(1,14599664,1,1,2) [2025-03-03 16:23:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599664,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:23:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599664,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:23:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599664,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:23:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599664,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:23:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599664', 'tblTempUsageDetail_20' ) start [2025-03-03 16:23:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599664', 'tblTempUsageDetail_20' ) end [2025-03-03 16:23:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:23:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:23:28] Production.INFO: ==4944== Releasing lock... [2025-03-03 16:23:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:23:28] Production.INFO: 77.5 MB #Memory Used# [2025-03-03 16:24:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:24:05 [end_date_ymd] => 2025-03-03 16:24:05 [RateCDR] => 1 ) [2025-03-03 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-03 13:24:05' and `end` < '2025-03-03 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-03 16:24:18] Production.INFO: count ==6578 [2025-03-03 16:24:21] Production.ERROR: pbx CDR StartTime 2025-03-03 13:24:05 - End Time 2025-03-03 16:24:05 [2025-03-03 16:24:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:24:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599669', 'tblTempUsageDetail_20' ) start [2025-03-03 16:24:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599669', 'tblTempUsageDetail_20' ) end [2025-03-03 16:24:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599669', 'tblTempVendorCDR_20' ) start [2025-03-03 16:24:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599669', 'tblTempVendorCDR_20' ) end [2025-03-03 16:24:22] Production.INFO: ProcessCDR(1,14599669,1,1,2) [2025-03-03 16:24:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599669,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:24:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599669,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:24:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599669,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:24:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599669,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:24:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599669', 'tblTempUsageDetail_20' ) start [2025-03-03 16:24:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599669', 'tblTempUsageDetail_20' ) end [2025-03-03 16:24:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:24:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:24:27] Production.INFO: ==5037== Releasing lock... [2025-03-03 16:24:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:24:27] Production.INFO: 77.25 MB #Memory Used# [2025-03-03 16:25:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:25:05 [end_date_ymd] => 2025-03-03 16:25:05 [RateCDR] => 1 ) [2025-03-03 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-03 13:25:05' and `end` < '2025-03-03 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-03 16:25:19] Production.INFO: count ==6568 [2025-03-03 16:25:23] Production.ERROR: pbx CDR StartTime 2025-03-03 13:25:05 - End Time 2025-03-03 16:25:05 [2025-03-03 16:25:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:25:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599674', 'tblTempUsageDetail_20' ) start [2025-03-03 16:25:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599674', 'tblTempUsageDetail_20' ) end [2025-03-03 16:25:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599674', 'tblTempVendorCDR_20' ) start [2025-03-03 16:25:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599674', 'tblTempVendorCDR_20' ) end [2025-03-03 16:25:23] Production.INFO: ProcessCDR(1,14599674,1,1,2) [2025-03-03 16:25:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599674,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:25:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599674,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:25:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599674,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:25:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599674,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:25:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599674', 'tblTempUsageDetail_20' ) start [2025-03-03 16:25:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599674', 'tblTempUsageDetail_20' ) end [2025-03-03 16:25:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:25:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:25:28] Production.INFO: ==5119== Releasing lock... [2025-03-03 16:25:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:25:28] Production.INFO: 77.25 MB #Memory Used# [2025-03-03 16:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:26:05 [end_date_ymd] => 2025-03-03 16:26:05 [RateCDR] => 1 ) [2025-03-03 16:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 13:26:05' and `end` < '2025-03-03 16:26:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 16:26:19] Production.INFO: count ==6559 [2025-03-03 16:26:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:26:05 - End Time 2025-03-03 16:26:05 [2025-03-03 16:26:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:26:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599679', 'tblTempUsageDetail_20' ) start [2025-03-03 16:26:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599679', 'tblTempUsageDetail_20' ) end [2025-03-03 16:26:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599679', 'tblTempVendorCDR_20' ) start [2025-03-03 16:26:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599679', 'tblTempVendorCDR_20' ) end [2025-03-03 16:26:22] Production.INFO: ProcessCDR(1,14599679,1,1,2) [2025-03-03 16:26:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599679,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:26:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599679,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:26:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599679,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:26:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599679,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:26:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599679', 'tblTempUsageDetail_20' ) start [2025-03-03 16:26:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599679', 'tblTempUsageDetail_20' ) end [2025-03-03 16:26:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:26:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:26:27] Production.INFO: ==5206== Releasing lock... [2025-03-03 16:26:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:26:27] Production.INFO: 77 MB #Memory Used# [2025-03-03 16:27:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:27:05 [end_date_ymd] => 2025-03-03 16:27:05 [RateCDR] => 1 ) [2025-03-03 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-03 13:27:05' and `end` < '2025-03-03 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-03 16:27:19] Production.INFO: count ==6513 [2025-03-03 16:27:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:27:05 - End Time 2025-03-03 16:27:05 [2025-03-03 16:27:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:27:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599684', 'tblTempUsageDetail_20' ) start [2025-03-03 16:27:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599684', 'tblTempUsageDetail_20' ) end [2025-03-03 16:27:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599684', 'tblTempVendorCDR_20' ) start [2025-03-03 16:27:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599684', 'tblTempVendorCDR_20' ) end [2025-03-03 16:27:22] Production.INFO: ProcessCDR(1,14599684,1,1,2) [2025-03-03 16:27:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599684,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:27:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599684,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:27:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599684,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:27:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599684,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:27:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599684', 'tblTempUsageDetail_20' ) start [2025-03-03 16:27:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599684', 'tblTempUsageDetail_20' ) end [2025-03-03 16:27:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:27:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:27:28] Production.INFO: ==5292== Releasing lock... [2025-03-03 16:27:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:27:28] Production.INFO: 76.75 MB #Memory Used# [2025-03-03 16:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:28:05 [end_date_ymd] => 2025-03-03 16:28:05 [RateCDR] => 1 ) [2025-03-03 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-03 13:28:05' and `end` < '2025-03-03 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-03 16:28:18] Production.INFO: count ==6502 [2025-03-03 16:28:21] Production.ERROR: pbx CDR StartTime 2025-03-03 13:28:05 - End Time 2025-03-03 16:28:05 [2025-03-03 16:28:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:28:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599689', 'tblTempUsageDetail_20' ) start [2025-03-03 16:28:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599689', 'tblTempUsageDetail_20' ) end [2025-03-03 16:28:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599689', 'tblTempVendorCDR_20' ) start [2025-03-03 16:28:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599689', 'tblTempVendorCDR_20' ) end [2025-03-03 16:28:22] Production.INFO: ProcessCDR(1,14599689,1,1,2) [2025-03-03 16:28:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599689,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:28:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599689,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:28:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599689,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:28:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599689,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:28:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599689', 'tblTempUsageDetail_20' ) start [2025-03-03 16:28:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599689', 'tblTempUsageDetail_20' ) end [2025-03-03 16:28:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:28:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:28:27] Production.INFO: ==5376== Releasing lock... [2025-03-03 16:28:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:28:27] Production.INFO: 76.75 MB #Memory Used# [2025-03-03 16:29:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:29:05 [end_date_ymd] => 2025-03-03 16:29:05 [RateCDR] => 1 ) [2025-03-03 16:29:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 13:29:05' and `end` < '2025-03-03 16:29:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 16:29:20] Production.INFO: count ==6504 [2025-03-03 16:29:23] Production.ERROR: pbx CDR StartTime 2025-03-03 13:29:05 - End Time 2025-03-03 16:29:05 [2025-03-03 16:29:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:29:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599694', 'tblTempUsageDetail_20' ) start [2025-03-03 16:29:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599694', 'tblTempUsageDetail_20' ) end [2025-03-03 16:29:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599694', 'tblTempVendorCDR_20' ) start [2025-03-03 16:29:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599694', 'tblTempVendorCDR_20' ) end [2025-03-03 16:29:23] Production.INFO: ProcessCDR(1,14599694,1,1,2) [2025-03-03 16:29:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599694,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:29:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599694,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:29:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599694,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:29:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599694,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:29:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599694', 'tblTempUsageDetail_20' ) start [2025-03-03 16:29:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599694', 'tblTempUsageDetail_20' ) end [2025-03-03 16:29:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:29:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:29:28] Production.INFO: ==5461== Releasing lock... [2025-03-03 16:29:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:29:28] Production.INFO: 76.75 MB #Memory Used# [2025-03-03 16:30:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:30:06 [end_date_ymd] => 2025-03-03 16:30:06 [RateCDR] => 1 ) [2025-03-03 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-03 13:30:06' and `end` < '2025-03-03 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-03 16:30:20] Production.INFO: count ==6489 [2025-03-03 16:30:23] Production.ERROR: pbx CDR StartTime 2025-03-03 13:30:06 - End Time 2025-03-03 16:30:06 [2025-03-03 16:30:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:30:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599700', 'tblTempUsageDetail_20' ) start [2025-03-03 16:30:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599700', 'tblTempUsageDetail_20' ) end [2025-03-03 16:30:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599700', 'tblTempVendorCDR_20' ) start [2025-03-03 16:30:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599700', 'tblTempVendorCDR_20' ) end [2025-03-03 16:30:23] Production.INFO: ProcessCDR(1,14599700,1,1,2) [2025-03-03 16:30:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599700,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:30:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599700,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:30:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599700,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:30:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599700,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:30:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599700', 'tblTempUsageDetail_20' ) start [2025-03-03 16:30:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599700', 'tblTempUsageDetail_20' ) end [2025-03-03 16:30:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:30:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:30:28] Production.INFO: ==5552== Releasing lock... [2025-03-03 16:30:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:30:28] Production.INFO: 76.5 MB #Memory Used# [2025-03-03 16:31:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:31:05 [end_date_ymd] => 2025-03-03 16:31:05 [RateCDR] => 1 ) [2025-03-03 16:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 13:31:05' and `end` < '2025-03-03 16:31:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 16:31:19] Production.INFO: count ==6510 [2025-03-03 16:31:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:31:05 - End Time 2025-03-03 16:31:05 [2025-03-03 16:31:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:31:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599705', 'tblTempUsageDetail_20' ) start [2025-03-03 16:31:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599705', 'tblTempUsageDetail_20' ) end [2025-03-03 16:31:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599705', 'tblTempVendorCDR_20' ) start [2025-03-03 16:31:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599705', 'tblTempVendorCDR_20' ) end [2025-03-03 16:31:22] Production.INFO: ProcessCDR(1,14599705,1,1,2) [2025-03-03 16:31:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599705,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:31:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599705,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:31:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599705,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:31:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599705,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:31:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599705', 'tblTempUsageDetail_20' ) start [2025-03-03 16:31:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599705', 'tblTempUsageDetail_20' ) end [2025-03-03 16:31:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:31:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:31:27] Production.INFO: ==5643== Releasing lock... [2025-03-03 16:31:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:31:27] Production.INFO: 76.75 MB #Memory Used# [2025-03-03 16:32:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:32:05 [end_date_ymd] => 2025-03-03 16:32:05 [RateCDR] => 1 ) [2025-03-03 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-03 13:32:05' and `end` < '2025-03-03 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-03 16:32:19] Production.INFO: count ==6485 [2025-03-03 16:32:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:32:05 - End Time 2025-03-03 16:32:05 [2025-03-03 16:32:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:32:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599710', 'tblTempUsageDetail_20' ) start [2025-03-03 16:32:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599710', 'tblTempUsageDetail_20' ) end [2025-03-03 16:32:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599710', 'tblTempVendorCDR_20' ) start [2025-03-03 16:32:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599710', 'tblTempVendorCDR_20' ) end [2025-03-03 16:32:22] Production.INFO: ProcessCDR(1,14599710,1,1,2) [2025-03-03 16:32:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599710,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:32:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599710,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:32:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599710,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:32:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599710,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:32:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599710', 'tblTempUsageDetail_20' ) start [2025-03-03 16:32:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599710', 'tblTempUsageDetail_20' ) end [2025-03-03 16:32:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:32:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:32:28] Production.INFO: ==5734== Releasing lock... [2025-03-03 16:32:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:32:28] Production.INFO: 76.5 MB #Memory Used# [2025-03-03 16:33:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:33:05 [end_date_ymd] => 2025-03-03 16:33:05 [RateCDR] => 1 ) [2025-03-03 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-03 13:33:05' and `end` < '2025-03-03 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-03 16:33:18] Production.INFO: count ==6495 [2025-03-03 16:33:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:33:05 - End Time 2025-03-03 16:33:05 [2025-03-03 16:33:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:33:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599715', 'tblTempUsageDetail_20' ) start [2025-03-03 16:33:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599715', 'tblTempUsageDetail_20' ) end [2025-03-03 16:33:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599715', 'tblTempVendorCDR_20' ) start [2025-03-03 16:33:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599715', 'tblTempVendorCDR_20' ) end [2025-03-03 16:33:22] Production.INFO: ProcessCDR(1,14599715,1,1,2) [2025-03-03 16:33:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599715,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:33:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599715,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:33:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599715,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:33:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599715,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:33:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599715', 'tblTempUsageDetail_20' ) start [2025-03-03 16:33:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599715', 'tblTempUsageDetail_20' ) end [2025-03-03 16:33:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:33:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:33:27] Production.INFO: ==5819== Releasing lock... [2025-03-03 16:33:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:33:27] Production.INFO: 77 MB #Memory Used# [2025-03-03 16:34:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:34:05 [end_date_ymd] => 2025-03-03 16:34:05 [RateCDR] => 1 ) [2025-03-03 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-03 13:34:05' and `end` < '2025-03-03 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-03 16:34:19] Production.INFO: count ==6490 [2025-03-03 16:34:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:34:05 - End Time 2025-03-03 16:34:05 [2025-03-03 16:34:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:34:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599720', 'tblTempUsageDetail_20' ) start [2025-03-03 16:34:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599720', 'tblTempUsageDetail_20' ) end [2025-03-03 16:34:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599720', 'tblTempVendorCDR_20' ) start [2025-03-03 16:34:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599720', 'tblTempVendorCDR_20' ) end [2025-03-03 16:34:23] Production.INFO: ProcessCDR(1,14599720,1,1,2) [2025-03-03 16:34:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599720,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:34:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599720,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:34:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599720,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:34:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599720,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:34:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599720', 'tblTempUsageDetail_20' ) start [2025-03-03 16:34:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599720', 'tblTempUsageDetail_20' ) end [2025-03-03 16:34:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:34:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:34:28] Production.INFO: ==5912== Releasing lock... [2025-03-03 16:34:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:34:28] Production.INFO: 76.5 MB #Memory Used# [2025-03-03 16:35:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:35:05 [end_date_ymd] => 2025-03-03 16:35:05 [RateCDR] => 1 ) [2025-03-03 16:35:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 13:35:05' and `end` < '2025-03-03 16:35:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 16:35:19] Production.INFO: count ==6479 [2025-03-03 16:35:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:35:05 - End Time 2025-03-03 16:35:05 [2025-03-03 16:35:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:35:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599725', 'tblTempUsageDetail_20' ) start [2025-03-03 16:35:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599725', 'tblTempUsageDetail_20' ) end [2025-03-03 16:35:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599725', 'tblTempVendorCDR_20' ) start [2025-03-03 16:35:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599725', 'tblTempVendorCDR_20' ) end [2025-03-03 16:35:22] Production.INFO: ProcessCDR(1,14599725,1,1,2) [2025-03-03 16:35:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599725,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:35:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599725,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:35:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599725,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:35:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599725,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:35:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599725', 'tblTempUsageDetail_20' ) start [2025-03-03 16:35:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599725', 'tblTempUsageDetail_20' ) end [2025-03-03 16:35:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:35:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:35:27] Production.INFO: ==6036== Releasing lock... [2025-03-03 16:35:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:35:27] Production.INFO: 76.5 MB #Memory Used# [2025-03-03 16:36:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:36:05 [end_date_ymd] => 2025-03-03 16:36:05 [RateCDR] => 1 ) [2025-03-03 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-03 13:36:05' and `end` < '2025-03-03 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-03 16:36:19] Production.INFO: count ==6441 [2025-03-03 16:36:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:36:05 - End Time 2025-03-03 16:36:05 [2025-03-03 16:36:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:36:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599730', 'tblTempUsageDetail_20' ) start [2025-03-03 16:36:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599730', 'tblTempUsageDetail_20' ) end [2025-03-03 16:36:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599730', 'tblTempVendorCDR_20' ) start [2025-03-03 16:36:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599730', 'tblTempVendorCDR_20' ) end [2025-03-03 16:36:23] Production.INFO: ProcessCDR(1,14599730,1,1,2) [2025-03-03 16:36:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599730,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:36:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599730,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:36:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599730,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:36:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599730,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:36:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599730', 'tblTempUsageDetail_20' ) start [2025-03-03 16:36:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599730', 'tblTempUsageDetail_20' ) end [2025-03-03 16:36:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:36:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:36:28] Production.INFO: ==6124== Releasing lock... [2025-03-03 16:36:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:36:28] Production.INFO: 76.25 MB #Memory Used# [2025-03-03 16:37:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:37:06 [end_date_ymd] => 2025-03-03 16:37:06 [RateCDR] => 1 ) [2025-03-03 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-03 13:37:06' and `end` < '2025-03-03 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-03 16:37:19] Production.INFO: count ==6411 [2025-03-03 16:37:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:37:06 - End Time 2025-03-03 16:37:06 [2025-03-03 16:37:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:37:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599735', 'tblTempUsageDetail_20' ) start [2025-03-03 16:37:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599735', 'tblTempUsageDetail_20' ) end [2025-03-03 16:37:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599735', 'tblTempVendorCDR_20' ) start [2025-03-03 16:37:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599735', 'tblTempVendorCDR_20' ) end [2025-03-03 16:37:22] Production.INFO: ProcessCDR(1,14599735,1,1,2) [2025-03-03 16:37:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599735,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:37:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599735,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:37:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599735,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:37:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599735,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:37:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599735', 'tblTempUsageDetail_20' ) start [2025-03-03 16:37:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599735', 'tblTempUsageDetail_20' ) end [2025-03-03 16:37:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:37:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:37:28] Production.INFO: ==6216== Releasing lock... [2025-03-03 16:37:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:37:28] Production.INFO: 76 MB #Memory Used# [2025-03-03 16:38:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:38:05 [end_date_ymd] => 2025-03-03 16:38:05 [RateCDR] => 1 ) [2025-03-03 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-03 13:38:05' and `end` < '2025-03-03 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-03 16:38:19] Production.INFO: count ==6369 [2025-03-03 16:38:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:38:05 - End Time 2025-03-03 16:38:05 [2025-03-03 16:38:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:38:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599740', 'tblTempUsageDetail_20' ) start [2025-03-03 16:38:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599740', 'tblTempUsageDetail_20' ) end [2025-03-03 16:38:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599740', 'tblTempVendorCDR_20' ) start [2025-03-03 16:38:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599740', 'tblTempVendorCDR_20' ) end [2025-03-03 16:38:22] Production.INFO: ProcessCDR(1,14599740,1,1,2) [2025-03-03 16:38:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599740,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:38:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599740,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:38:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599740,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:38:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599740,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:38:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599740', 'tblTempUsageDetail_20' ) start [2025-03-03 16:38:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599740', 'tblTempUsageDetail_20' ) end [2025-03-03 16:38:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:38:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:38:27] Production.INFO: ==6313== Releasing lock... [2025-03-03 16:38:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:38:27] Production.INFO: 75.75 MB #Memory Used# [2025-03-03 16:39:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:39:05 [end_date_ymd] => 2025-03-03 16:39:05 [RateCDR] => 1 ) [2025-03-03 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-03 13:39:05' and `end` < '2025-03-03 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-03 16:39:19] Production.INFO: count ==6354 [2025-03-03 16:39:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:39:05 - End Time 2025-03-03 16:39:05 [2025-03-03 16:39:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:39:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599745', 'tblTempUsageDetail_20' ) start [2025-03-03 16:39:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599745', 'tblTempUsageDetail_20' ) end [2025-03-03 16:39:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599745', 'tblTempVendorCDR_20' ) start [2025-03-03 16:39:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599745', 'tblTempVendorCDR_20' ) end [2025-03-03 16:39:22] Production.INFO: ProcessCDR(1,14599745,1,1,2) [2025-03-03 16:39:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599745,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:39:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599745,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:39:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599745,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:39:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599745,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:39:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599745', 'tblTempUsageDetail_20' ) start [2025-03-03 16:39:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599745', 'tblTempUsageDetail_20' ) end [2025-03-03 16:39:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:39:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:39:27] Production.INFO: ==6410== Releasing lock... [2025-03-03 16:39:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:39:27] Production.INFO: 75.5 MB #Memory Used# [2025-03-03 16:40:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:40:05 [end_date_ymd] => 2025-03-03 16:40:05 [RateCDR] => 1 ) [2025-03-03 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-03 13:40:05' and `end` < '2025-03-03 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-03 16:40:19] Production.INFO: count ==6329 [2025-03-03 16:40:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:40:05 - End Time 2025-03-03 16:40:05 [2025-03-03 16:40:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:40:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599751', 'tblTempUsageDetail_20' ) start [2025-03-03 16:40:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599751', 'tblTempUsageDetail_20' ) end [2025-03-03 16:40:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599751', 'tblTempVendorCDR_20' ) start [2025-03-03 16:40:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599751', 'tblTempVendorCDR_20' ) end [2025-03-03 16:40:22] Production.INFO: ProcessCDR(1,14599751,1,1,2) [2025-03-03 16:40:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599751,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:40:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599751,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:40:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599751,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:40:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599751,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:40:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599751', 'tblTempUsageDetail_20' ) start [2025-03-03 16:40:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599751', 'tblTempUsageDetail_20' ) end [2025-03-03 16:40:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:40:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:40:28] Production.INFO: ==6503== Releasing lock... [2025-03-03 16:40:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:40:28] Production.INFO: 75.5 MB #Memory Used# [2025-03-03 16:41:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:41:05 [end_date_ymd] => 2025-03-03 16:41:05 [RateCDR] => 1 ) [2025-03-03 16:41:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 13:41:05' and `end` < '2025-03-03 16:41:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 16:41:19] Production.INFO: count ==6302 [2025-03-03 16:41:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:41:05 - End Time 2025-03-03 16:41:05 [2025-03-03 16:41:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:41:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599756', 'tblTempUsageDetail_20' ) start [2025-03-03 16:41:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599756', 'tblTempUsageDetail_20' ) end [2025-03-03 16:41:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599756', 'tblTempVendorCDR_20' ) start [2025-03-03 16:41:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599756', 'tblTempVendorCDR_20' ) end [2025-03-03 16:41:23] Production.INFO: ProcessCDR(1,14599756,1,1,2) [2025-03-03 16:41:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599756,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:41:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599756,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:41:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599756,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:41:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599756,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:41:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599756', 'tblTempUsageDetail_20' ) start [2025-03-03 16:41:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599756', 'tblTempUsageDetail_20' ) end [2025-03-03 16:41:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:41:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:41:28] Production.INFO: ==6596== Releasing lock... [2025-03-03 16:41:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:41:28] Production.INFO: 75.25 MB #Memory Used# [2025-03-03 16:42:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:42:05 [end_date_ymd] => 2025-03-03 16:42:05 [RateCDR] => 1 ) [2025-03-03 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-03 13:42:05' and `end` < '2025-03-03 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-03 16:42:18] Production.INFO: count ==6295 [2025-03-03 16:42:21] Production.ERROR: pbx CDR StartTime 2025-03-03 13:42:05 - End Time 2025-03-03 16:42:05 [2025-03-03 16:42:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:42:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599761', 'tblTempUsageDetail_20' ) start [2025-03-03 16:42:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599761', 'tblTempUsageDetail_20' ) end [2025-03-03 16:42:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599761', 'tblTempVendorCDR_20' ) start [2025-03-03 16:42:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599761', 'tblTempVendorCDR_20' ) end [2025-03-03 16:42:22] Production.INFO: ProcessCDR(1,14599761,1,1,2) [2025-03-03 16:42:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599761,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:42:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599761,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:42:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599761,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:42:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599761,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:42:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599761', 'tblTempUsageDetail_20' ) start [2025-03-03 16:42:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599761', 'tblTempUsageDetail_20' ) end [2025-03-03 16:42:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:42:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:42:27] Production.INFO: ==6686== Releasing lock... [2025-03-03 16:42:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:42:27] Production.INFO: 75.25 MB #Memory Used# [2025-03-03 16:43:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:43:05 [end_date_ymd] => 2025-03-03 16:43:05 [RateCDR] => 1 ) [2025-03-03 16:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 13:43:05' and `end` < '2025-03-03 16:43:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 16:43:18] Production.INFO: count ==6290 [2025-03-03 16:43:21] Production.ERROR: pbx CDR StartTime 2025-03-03 13:43:05 - End Time 2025-03-03 16:43:05 [2025-03-03 16:43:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:43:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599765', 'tblTempUsageDetail_20' ) start [2025-03-03 16:43:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599765', 'tblTempUsageDetail_20' ) end [2025-03-03 16:43:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599765', 'tblTempVendorCDR_20' ) start [2025-03-03 16:43:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599765', 'tblTempVendorCDR_20' ) end [2025-03-03 16:43:21] Production.INFO: ProcessCDR(1,14599765,1,1,2) [2025-03-03 16:43:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599765,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:43:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599765,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:43:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599765,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:43:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599765,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:43:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599765', 'tblTempUsageDetail_20' ) start [2025-03-03 16:43:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599765', 'tblTempUsageDetail_20' ) end [2025-03-03 16:43:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:43:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:43:27] Production.INFO: ==6772== Releasing lock... [2025-03-03 16:43:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:43:27] Production.INFO: 75 MB #Memory Used# [2025-03-03 16:44:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:44:05 [end_date_ymd] => 2025-03-03 16:44:05 [RateCDR] => 1 ) [2025-03-03 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-03 13:44:05' and `end` < '2025-03-03 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-03 16:44:18] Production.INFO: count ==6290 [2025-03-03 16:44:21] Production.ERROR: pbx CDR StartTime 2025-03-03 13:44:05 - End Time 2025-03-03 16:44:05 [2025-03-03 16:44:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:44:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599771', 'tblTempUsageDetail_20' ) start [2025-03-03 16:44:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599771', 'tblTempUsageDetail_20' ) end [2025-03-03 16:44:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599771', 'tblTempVendorCDR_20' ) start [2025-03-03 16:44:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599771', 'tblTempVendorCDR_20' ) end [2025-03-03 16:44:22] Production.INFO: ProcessCDR(1,14599771,1,1,2) [2025-03-03 16:44:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599771,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:44:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599771,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:44:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599771,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:44:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599771,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:44:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599771', 'tblTempUsageDetail_20' ) start [2025-03-03 16:44:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599771', 'tblTempUsageDetail_20' ) end [2025-03-03 16:44:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:44:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:44:27] Production.INFO: ==6868== Releasing lock... [2025-03-03 16:44:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:44:27] Production.INFO: 75 MB #Memory Used# [2025-03-03 16:45:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:45:06 [end_date_ymd] => 2025-03-03 16:45:06 [RateCDR] => 1 ) [2025-03-03 16: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-03 13:45:06' and `end` < '2025-03-03 16: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-03 16:45:19] Production.INFO: count ==6288 [2025-03-03 16:45:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:45:06 - End Time 2025-03-03 16:45:06 [2025-03-03 16:45:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:45:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599776', 'tblTempUsageDetail_20' ) start [2025-03-03 16:45:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599776', 'tblTempUsageDetail_20' ) end [2025-03-03 16:45:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599776', 'tblTempVendorCDR_20' ) start [2025-03-03 16:45:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599776', 'tblTempVendorCDR_20' ) end [2025-03-03 16:45:23] Production.INFO: ProcessCDR(1,14599776,1,1,2) [2025-03-03 16:45:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599776,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:45:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599776,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:45:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599776,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:45:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599776,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:45:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599776', 'tblTempUsageDetail_20' ) start [2025-03-03 16:45:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599776', 'tblTempUsageDetail_20' ) end [2025-03-03 16:45:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:45:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:45:28] Production.INFO: ==6963== Releasing lock... [2025-03-03 16:45:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:45:28] Production.INFO: 75 MB #Memory Used# [2025-03-03 16:46:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:46:06 [end_date_ymd] => 2025-03-03 16:46:06 [RateCDR] => 1 ) [2025-03-03 16:46:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 13:46:06' and `end` < '2025-03-03 16:46:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 16:46:19] Production.INFO: count ==6276 [2025-03-03 16:46:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:46:06 - End Time 2025-03-03 16:46:06 [2025-03-03 16:46:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:46:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599781', 'tblTempUsageDetail_20' ) start [2025-03-03 16:46:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599781', 'tblTempUsageDetail_20' ) end [2025-03-03 16:46:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599781', 'tblTempVendorCDR_20' ) start [2025-03-03 16:46:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599781', 'tblTempVendorCDR_20' ) end [2025-03-03 16:46:22] Production.INFO: ProcessCDR(1,14599781,1,1,2) [2025-03-03 16:46:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599781,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:46:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599781,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:46:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599781,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:46:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599781,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:46:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599781', 'tblTempUsageDetail_20' ) start [2025-03-03 16:46:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599781', 'tblTempUsageDetail_20' ) end [2025-03-03 16:46:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:46:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:46:27] Production.INFO: ==7054== Releasing lock... [2025-03-03 16:46:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:46:27] Production.INFO: 75 MB #Memory Used# [2025-03-03 16:47:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:47:05 [end_date_ymd] => 2025-03-03 16:47:05 [RateCDR] => 1 ) [2025-03-03 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-03 13:47:05' and `end` < '2025-03-03 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-03 16:47:18] Production.INFO: count ==6273 [2025-03-03 16:47:21] Production.ERROR: pbx CDR StartTime 2025-03-03 13:47:05 - End Time 2025-03-03 16:47:05 [2025-03-03 16:47:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:47:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599786', 'tblTempUsageDetail_20' ) start [2025-03-03 16:47:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599786', 'tblTempUsageDetail_20' ) end [2025-03-03 16:47:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599786', 'tblTempVendorCDR_20' ) start [2025-03-03 16:47:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599786', 'tblTempVendorCDR_20' ) end [2025-03-03 16:47:22] Production.INFO: ProcessCDR(1,14599786,1,1,2) [2025-03-03 16:47:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599786,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:47:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599786,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:47:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599786,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:47:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599786,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:47:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599786', 'tblTempUsageDetail_20' ) start [2025-03-03 16:47:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599786', 'tblTempUsageDetail_20' ) end [2025-03-03 16:47:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:47:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:47:27] Production.INFO: ==7136== Releasing lock... [2025-03-03 16:47:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:47:27] Production.INFO: 75 MB #Memory Used# [2025-03-03 16:48:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:48:05 [end_date_ymd] => 2025-03-03 16:48:05 [RateCDR] => 1 ) [2025-03-03 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-03 13:48:05' and `end` < '2025-03-03 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-03 16:48:18] Production.INFO: count ==6265 [2025-03-03 16:48:21] Production.ERROR: pbx CDR StartTime 2025-03-03 13:48:05 - End Time 2025-03-03 16:48:05 [2025-03-03 16:48:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:48:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599791', 'tblTempUsageDetail_20' ) start [2025-03-03 16:48:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599791', 'tblTempUsageDetail_20' ) end [2025-03-03 16:48:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599791', 'tblTempVendorCDR_20' ) start [2025-03-03 16:48:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599791', 'tblTempVendorCDR_20' ) end [2025-03-03 16:48:22] Production.INFO: ProcessCDR(1,14599791,1,1,2) [2025-03-03 16:48:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599791,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:48:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599791,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:48:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599791,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:48:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599791,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:48:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599791', 'tblTempUsageDetail_20' ) start [2025-03-03 16:48:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599791', 'tblTempUsageDetail_20' ) end [2025-03-03 16:48:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:48:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:48:27] Production.INFO: ==7212== Releasing lock... [2025-03-03 16:48:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:48:27] Production.INFO: 75 MB #Memory Used# [2025-03-03 16:49:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:49:05 [end_date_ymd] => 2025-03-03 16:49:05 [RateCDR] => 1 ) [2025-03-03 16:49:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 13:49:05' and `end` < '2025-03-03 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-03 16:49:18] Production.INFO: count ==6232 [2025-03-03 16:49:21] Production.ERROR: pbx CDR StartTime 2025-03-03 13:49:05 - End Time 2025-03-03 16:49:05 [2025-03-03 16:49:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:49:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599796', 'tblTempUsageDetail_20' ) start [2025-03-03 16:49:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599796', 'tblTempUsageDetail_20' ) end [2025-03-03 16:49:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599796', 'tblTempVendorCDR_20' ) start [2025-03-03 16:49:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599796', 'tblTempVendorCDR_20' ) end [2025-03-03 16:49:21] Production.INFO: ProcessCDR(1,14599796,1,1,2) [2025-03-03 16:49:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599796,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:49:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599796,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:49:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599796,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:49:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599796,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:49:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599796', 'tblTempUsageDetail_20' ) start [2025-03-03 16:49:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599796', 'tblTempUsageDetail_20' ) end [2025-03-03 16:49:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:49:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:49:26] Production.INFO: ==7291== Releasing lock... [2025-03-03 16:49:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:49:26] Production.INFO: 74.75 MB #Memory Used# [2025-03-03 16:50:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:50:06 [end_date_ymd] => 2025-03-03 16:50:06 [RateCDR] => 1 ) [2025-03-03 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-03 13:50:06' and `end` < '2025-03-03 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-03 16:50:19] Production.INFO: count ==6237 [2025-03-03 16:50:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:50:06 - End Time 2025-03-03 16:50:06 [2025-03-03 16:50:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:50:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599802', 'tblTempUsageDetail_20' ) start [2025-03-03 16:50:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599802', 'tblTempUsageDetail_20' ) end [2025-03-03 16:50:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599802', 'tblTempVendorCDR_20' ) start [2025-03-03 16:50:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599802', 'tblTempVendorCDR_20' ) end [2025-03-03 16:50:23] Production.INFO: ProcessCDR(1,14599802,1,1,2) [2025-03-03 16:50:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599802,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:50:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599802,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:50:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599802,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:50:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599802,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:50:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599802', 'tblTempUsageDetail_20' ) start [2025-03-03 16:50:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599802', 'tblTempUsageDetail_20' ) end [2025-03-03 16:50:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:50:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:50:28] Production.INFO: ==7413== Releasing lock... [2025-03-03 16:50:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:50:28] Production.INFO: 74.75 MB #Memory Used# [2025-03-03 16:51:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:51:05 [end_date_ymd] => 2025-03-03 16:51:05 [RateCDR] => 1 ) [2025-03-03 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-03 13:51:05' and `end` < '2025-03-03 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-03 16:51:18] Production.INFO: count ==6166 [2025-03-03 16:51:21] Production.ERROR: pbx CDR StartTime 2025-03-03 13:51:05 - End Time 2025-03-03 16:51:05 [2025-03-03 16:51:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:51:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599807', 'tblTempUsageDetail_20' ) start [2025-03-03 16:51:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599807', 'tblTempUsageDetail_20' ) end [2025-03-03 16:51:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599807', 'tblTempVendorCDR_20' ) start [2025-03-03 16:51:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599807', 'tblTempVendorCDR_20' ) end [2025-03-03 16:51:21] Production.INFO: ProcessCDR(1,14599807,1,1,2) [2025-03-03 16:51:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599807,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:51:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599807,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:51:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599807,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:51:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599807,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:51:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599807', 'tblTempUsageDetail_20' ) start [2025-03-03 16:51:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599807', 'tblTempUsageDetail_20' ) end [2025-03-03 16:51:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:51:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:51:26] Production.INFO: ==7490== Releasing lock... [2025-03-03 16:51:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:51:26] Production.INFO: 74.25 MB #Memory Used# [2025-03-03 16:52:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:52:05 [end_date_ymd] => 2025-03-03 16:52:05 [RateCDR] => 1 ) [2025-03-03 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-03 13:52:05' and `end` < '2025-03-03 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-03 16:52:19] Production.INFO: count ==6157 [2025-03-03 16:52:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:52:05 - End Time 2025-03-03 16:52:05 [2025-03-03 16:52:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:52:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599812', 'tblTempUsageDetail_20' ) start [2025-03-03 16:52:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599812', 'tblTempUsageDetail_20' ) end [2025-03-03 16:52:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599812', 'tblTempVendorCDR_20' ) start [2025-03-03 16:52:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599812', 'tblTempVendorCDR_20' ) end [2025-03-03 16:52:22] Production.INFO: ProcessCDR(1,14599812,1,1,2) [2025-03-03 16:52:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599812,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:52:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599812,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:52:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599812,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:52:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599812,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:52:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599812', 'tblTempUsageDetail_20' ) start [2025-03-03 16:52:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599812', 'tblTempUsageDetail_20' ) end [2025-03-03 16:52:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:52:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:52:27] Production.INFO: ==7573== Releasing lock... [2025-03-03 16:52:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:52:27] Production.INFO: 74 MB #Memory Used# [2025-03-03 16:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:53:05 [end_date_ymd] => 2025-03-03 16:53:05 [RateCDR] => 1 ) [2025-03-03 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-03 13:53:05' and `end` < '2025-03-03 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-03 16:53:18] Production.INFO: count ==6154 [2025-03-03 16:53:21] Production.ERROR: pbx CDR StartTime 2025-03-03 13:53:05 - End Time 2025-03-03 16:53:05 [2025-03-03 16:53:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:53:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599817', 'tblTempUsageDetail_20' ) start [2025-03-03 16:53:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599817', 'tblTempUsageDetail_20' ) end [2025-03-03 16:53:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599817', 'tblTempVendorCDR_20' ) start [2025-03-03 16:53:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599817', 'tblTempVendorCDR_20' ) end [2025-03-03 16:53:22] Production.INFO: ProcessCDR(1,14599817,1,1,2) [2025-03-03 16:53:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599817,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:53:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599817,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:53:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599817,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:53:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599817,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:53:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599817', 'tblTempUsageDetail_20' ) start [2025-03-03 16:53:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599817', 'tblTempUsageDetail_20' ) end [2025-03-03 16:53:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:53:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:53:27] Production.INFO: ==7654== Releasing lock... [2025-03-03 16:53:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:53:27] Production.INFO: 74 MB #Memory Used# [2025-03-03 16:54:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:54:05 [end_date_ymd] => 2025-03-03 16:54:05 [RateCDR] => 1 ) [2025-03-03 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-03 13:54:05' and `end` < '2025-03-03 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-03 16:54:19] Production.INFO: count ==6157 [2025-03-03 16:54:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:54:05 - End Time 2025-03-03 16:54:05 [2025-03-03 16:54:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:54:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599822', 'tblTempUsageDetail_20' ) start [2025-03-03 16:54:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599822', 'tblTempUsageDetail_20' ) end [2025-03-03 16:54:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599822', 'tblTempVendorCDR_20' ) start [2025-03-03 16:54:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599822', 'tblTempVendorCDR_20' ) end [2025-03-03 16:54:22] Production.INFO: ProcessCDR(1,14599822,1,1,2) [2025-03-03 16:54:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599822,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:54:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599822,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:54:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599822,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:54:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599822,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:54:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599822', 'tblTempUsageDetail_20' ) start [2025-03-03 16:54:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599822', 'tblTempUsageDetail_20' ) end [2025-03-03 16:54:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:54:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:54:27] Production.INFO: ==7730== Releasing lock... [2025-03-03 16:54:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:54:27] Production.INFO: 74 MB #Memory Used# [2025-03-03 16:55:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:55:05 [end_date_ymd] => 2025-03-03 16:55:05 [RateCDR] => 1 ) [2025-03-03 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-03 13:55:05' and `end` < '2025-03-03 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-03 16:55:19] Production.INFO: count ==6115 [2025-03-03 16:55:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:55:05 - End Time 2025-03-03 16:55:05 [2025-03-03 16:55:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:55:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599827', 'tblTempUsageDetail_20' ) start [2025-03-03 16:55:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599827', 'tblTempUsageDetail_20' ) end [2025-03-03 16:55:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599827', 'tblTempVendorCDR_20' ) start [2025-03-03 16:55:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599827', 'tblTempVendorCDR_20' ) end [2025-03-03 16:55:22] Production.INFO: ProcessCDR(1,14599827,1,1,2) [2025-03-03 16:55:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599827,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:55:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599827,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:55:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599827,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:55:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599827,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:55:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599827', 'tblTempUsageDetail_20' ) start [2025-03-03 16:55:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599827', 'tblTempUsageDetail_20' ) end [2025-03-03 16:55:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:55:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:55:27] Production.INFO: ==7806== Releasing lock... [2025-03-03 16:55:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:55:27] Production.INFO: 73.75 MB #Memory Used# [2025-03-03 16:56:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:56:06 [end_date_ymd] => 2025-03-03 16:56:06 [RateCDR] => 1 ) [2025-03-03 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-03 13:56:06' and `end` < '2025-03-03 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-03 16:56:19] Production.INFO: count ==6101 [2025-03-03 16:56:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:56:06 - End Time 2025-03-03 16:56:06 [2025-03-03 16:56:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:56:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599832', 'tblTempUsageDetail_20' ) start [2025-03-03 16:56:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599832', 'tblTempUsageDetail_20' ) end [2025-03-03 16:56:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599832', 'tblTempVendorCDR_20' ) start [2025-03-03 16:56:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599832', 'tblTempVendorCDR_20' ) end [2025-03-03 16:56:23] Production.INFO: ProcessCDR(1,14599832,1,1,2) [2025-03-03 16:56:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599832,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:56:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599832,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:56:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599832,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:56:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599832,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:56:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599832', 'tblTempUsageDetail_20' ) start [2025-03-03 16:56:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599832', 'tblTempUsageDetail_20' ) end [2025-03-03 16:56:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:56:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:56:28] Production.INFO: ==7889== Releasing lock... [2025-03-03 16:56:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:56:28] Production.INFO: 73.75 MB #Memory Used# [2025-03-03 16:57:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:57:05 [end_date_ymd] => 2025-03-03 16:57:05 [RateCDR] => 1 ) [2025-03-03 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-03 13:57:05' and `end` < '2025-03-03 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-03 16:57:18] Production.INFO: count ==6080 [2025-03-03 16:57:21] Production.ERROR: pbx CDR StartTime 2025-03-03 13:57:05 - End Time 2025-03-03 16:57:05 [2025-03-03 16:57:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:57:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599837', 'tblTempUsageDetail_20' ) start [2025-03-03 16:57:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599837', 'tblTempUsageDetail_20' ) end [2025-03-03 16:57:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599837', 'tblTempVendorCDR_20' ) start [2025-03-03 16:57:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599837', 'tblTempVendorCDR_20' ) end [2025-03-03 16:57:21] Production.INFO: ProcessCDR(1,14599837,1,1,2) [2025-03-03 16:57:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599837,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:57:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599837,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:57:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599837,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:57:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599837,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:57:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599837', 'tblTempUsageDetail_20' ) start [2025-03-03 16:57:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599837', 'tblTempUsageDetail_20' ) end [2025-03-03 16:57:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:57:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:57:27] Production.INFO: ==7966== Releasing lock... [2025-03-03 16:57:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:57:27] Production.INFO: 73.5 MB #Memory Used# [2025-03-03 16:58:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:58:06 [end_date_ymd] => 2025-03-03 16:58:06 [RateCDR] => 1 ) [2025-03-03 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-03 13:58:06' and `end` < '2025-03-03 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-03 16:58:19] Production.INFO: count ==6080 [2025-03-03 16:58:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:58:06 - End Time 2025-03-03 16:58:06 [2025-03-03 16:58:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:58:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599842', 'tblTempUsageDetail_20' ) start [2025-03-03 16:58:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599842', 'tblTempUsageDetail_20' ) end [2025-03-03 16:58:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599842', 'tblTempVendorCDR_20' ) start [2025-03-03 16:58:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599842', 'tblTempVendorCDR_20' ) end [2025-03-03 16:58:22] Production.INFO: ProcessCDR(1,14599842,1,1,2) [2025-03-03 16:58:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599842,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:58:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599842,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:58:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599842,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:58:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599842,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:58:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599842', 'tblTempUsageDetail_20' ) start [2025-03-03 16:58:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599842', 'tblTempUsageDetail_20' ) end [2025-03-03 16:58:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:58:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:58:27] Production.INFO: ==8039== Releasing lock... [2025-03-03 16:58:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:58:27] Production.INFO: 73.5 MB #Memory Used# [2025-03-03 16:59:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 13:59:05 [end_date_ymd] => 2025-03-03 16:59:05 [RateCDR] => 1 ) [2025-03-03 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-03 13:59:05' and `end` < '2025-03-03 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-03 16:59:19] Production.INFO: count ==6056 [2025-03-03 16:59:22] Production.ERROR: pbx CDR StartTime 2025-03-03 13:59:05 - End Time 2025-03-03 16:59:05 [2025-03-03 16:59:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 16:59:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599847', 'tblTempUsageDetail_20' ) start [2025-03-03 16:59:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599847', 'tblTempUsageDetail_20' ) end [2025-03-03 16:59:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599847', 'tblTempVendorCDR_20' ) start [2025-03-03 16:59:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599847', 'tblTempVendorCDR_20' ) end [2025-03-03 16:59:22] Production.INFO: ProcessCDR(1,14599847,1,1,2) [2025-03-03 16:59:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599847,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:59:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599847,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 16:59:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599847,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:59:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599847,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 16:59:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599847', 'tblTempUsageDetail_20' ) start [2025-03-03 16:59:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599847', 'tblTempUsageDetail_20' ) end [2025-03-03 16:59:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 16:59:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 16:59:27] Production.INFO: ==8118== Releasing lock... [2025-03-03 16:59:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 16:59:27] Production.INFO: 73.25 MB #Memory Used# [2025-03-03 17:00:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:00:07 [end_date_ymd] => 2025-03-03 17:00:07 [RateCDR] => 1 ) [2025-03-03 17:00:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 14:00:07' and `end` < '2025-03-03 17:00:07' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 17:00:21] Production.INFO: count ==6063 [2025-03-03 17:00:24] Production.ERROR: pbx CDR StartTime 2025-03-03 14:00:07 - End Time 2025-03-03 17:00:07 [2025-03-03 17:00:24] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:00:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599853', 'tblTempUsageDetail_20' ) start [2025-03-03 17:00:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599853', 'tblTempUsageDetail_20' ) end [2025-03-03 17:00:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599853', 'tblTempVendorCDR_20' ) start [2025-03-03 17:00:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599853', 'tblTempVendorCDR_20' ) end [2025-03-03 17:00:24] Production.INFO: ProcessCDR(1,14599853,1,1,2) [2025-03-03 17:00:24] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599853,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:00:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599853,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:00:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599853,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:00:29] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599853,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:00:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599853', 'tblTempUsageDetail_20' ) start [2025-03-03 17:00:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599853', 'tblTempUsageDetail_20' ) end [2025-03-03 17:00:29] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:00:29] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:00:29] Production.INFO: ==8202== Releasing lock... [2025-03-03 17:00:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:00:29] Production.INFO: 73.5 MB #Memory Used# [2025-03-03 17:01:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:01:06 [end_date_ymd] => 2025-03-03 17:01:06 [RateCDR] => 1 ) [2025-03-03 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-03 14:01:06' and `end` < '2025-03-03 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-03 17:01:19] Production.INFO: count ==6087 [2025-03-03 17:01:22] Production.ERROR: pbx CDR StartTime 2025-03-03 14:01:06 - End Time 2025-03-03 17:01:06 [2025-03-03 17:01:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:01:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599858', 'tblTempUsageDetail_20' ) start [2025-03-03 17:01:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599858', 'tblTempUsageDetail_20' ) end [2025-03-03 17:01:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599858', 'tblTempVendorCDR_20' ) start [2025-03-03 17:01:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599858', 'tblTempVendorCDR_20' ) end [2025-03-03 17:01:22] Production.INFO: ProcessCDR(1,14599858,1,1,2) [2025-03-03 17:01:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599858,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:01:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599858,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:01:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599858,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:01:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599858,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:01:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599858', 'tblTempUsageDetail_20' ) start [2025-03-03 17:01:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599858', 'tblTempUsageDetail_20' ) end [2025-03-03 17:01:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:01:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:01:26] Production.INFO: ==8294== Releasing lock... [2025-03-03 17:01:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:01:26] Production.INFO: 73.5 MB #Memory Used# [2025-03-03 17:02:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:02:06 [end_date_ymd] => 2025-03-03 17:02:06 [RateCDR] => 1 ) [2025-03-03 17: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-03 14:02:06' and `end` < '2025-03-03 17: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-03 17:02:19] Production.INFO: count ==6095 [2025-03-03 17:02:23] Production.ERROR: pbx CDR StartTime 2025-03-03 14:02:06 - End Time 2025-03-03 17:02:06 [2025-03-03 17:02:23] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:02:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599863', 'tblTempUsageDetail_20' ) start [2025-03-03 17:02:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599863', 'tblTempUsageDetail_20' ) end [2025-03-03 17:02:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599863', 'tblTempVendorCDR_20' ) start [2025-03-03 17:02:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599863', 'tblTempVendorCDR_20' ) end [2025-03-03 17:02:23] Production.INFO: ProcessCDR(1,14599863,1,1,2) [2025-03-03 17:02:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599863,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:02:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599863,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:02:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599863,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:02:28] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599863,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:02:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599863', 'tblTempUsageDetail_20' ) start [2025-03-03 17:02:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599863', 'tblTempUsageDetail_20' ) end [2025-03-03 17:02:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:02:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:02:28] Production.INFO: ==8373== Releasing lock... [2025-03-03 17:02:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:02:28] Production.INFO: 73.75 MB #Memory Used# [2025-03-03 17:03:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:03:05 [end_date_ymd] => 2025-03-03 17:03:05 [RateCDR] => 1 ) [2025-03-03 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-03 14:03:05' and `end` < '2025-03-03 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-03 17:03:19] Production.INFO: count ==6075 [2025-03-03 17:03:22] Production.ERROR: pbx CDR StartTime 2025-03-03 14:03:05 - End Time 2025-03-03 17:03:05 [2025-03-03 17:03:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:03:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599868', 'tblTempUsageDetail_20' ) start [2025-03-03 17:03:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599868', 'tblTempUsageDetail_20' ) end [2025-03-03 17:03:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599868', 'tblTempVendorCDR_20' ) start [2025-03-03 17:03:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599868', 'tblTempVendorCDR_20' ) end [2025-03-03 17:03:22] Production.INFO: ProcessCDR(1,14599868,1,1,2) [2025-03-03 17:03:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599868,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:03:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599868,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:03:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599868,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:03:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599868,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:03:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599868', 'tblTempUsageDetail_20' ) start [2025-03-03 17:03:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599868', 'tblTempUsageDetail_20' ) end [2025-03-03 17:03:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:03:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:03:26] Production.INFO: ==8446== Releasing lock... [2025-03-03 17:03:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:03:26] Production.INFO: 73.5 MB #Memory Used# [2025-03-03 17:04:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:04:06 [end_date_ymd] => 2025-03-03 17:04:06 [RateCDR] => 1 ) [2025-03-03 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-03 14:04:06' and `end` < '2025-03-03 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-03 17:04:19] Production.INFO: count ==6072 [2025-03-03 17:04:22] Production.ERROR: pbx CDR StartTime 2025-03-03 14:04:06 - End Time 2025-03-03 17:04:06 [2025-03-03 17:04:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:04:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599873', 'tblTempUsageDetail_20' ) start [2025-03-03 17:04:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599873', 'tblTempUsageDetail_20' ) end [2025-03-03 17:04:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599873', 'tblTempVendorCDR_20' ) start [2025-03-03 17:04:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599873', 'tblTempVendorCDR_20' ) end [2025-03-03 17:04:22] Production.INFO: ProcessCDR(1,14599873,1,1,2) [2025-03-03 17:04:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599873,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:04:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599873,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:04:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599873,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:04:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599873,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:04:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599873', 'tblTempUsageDetail_20' ) start [2025-03-03 17:04:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599873', 'tblTempUsageDetail_20' ) end [2025-03-03 17:04:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:04:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:04:27] Production.INFO: ==8526== Releasing lock... [2025-03-03 17:04:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:04:27] Production.INFO: 73.5 MB #Memory Used# [2025-03-03 17:05:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:05:06 [end_date_ymd] => 2025-03-03 17:05:06 [RateCDR] => 1 ) [2025-03-03 17: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-03 14:05:06' and `end` < '2025-03-03 17: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-03 17:05:19] Production.INFO: count ==6064 [2025-03-03 17:05:22] Production.ERROR: pbx CDR StartTime 2025-03-03 14:05:06 - End Time 2025-03-03 17:05:06 [2025-03-03 17:05:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:05:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599878', 'tblTempUsageDetail_20' ) start [2025-03-03 17:05:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599878', 'tblTempUsageDetail_20' ) end [2025-03-03 17:05:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599878', 'tblTempVendorCDR_20' ) start [2025-03-03 17:05:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599878', 'tblTempVendorCDR_20' ) end [2025-03-03 17:05:22] Production.INFO: ProcessCDR(1,14599878,1,1,2) [2025-03-03 17:05:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599878,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:05:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599878,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:05:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599878,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:05:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599878,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:05:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599878', 'tblTempUsageDetail_20' ) start [2025-03-03 17:05:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599878', 'tblTempUsageDetail_20' ) end [2025-03-03 17:05:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:05:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:05:27] Production.INFO: ==8639== Releasing lock... [2025-03-03 17:05:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:05:27] Production.INFO: 73.5 MB #Memory Used# [2025-03-03 17:06:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:06:05 [end_date_ymd] => 2025-03-03 17:06:05 [RateCDR] => 1 ) [2025-03-03 17:06:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 14:06:05' and `end` < '2025-03-03 17:06:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 17:06:19] Production.INFO: count ==6088 [2025-03-03 17:06:22] Production.ERROR: pbx CDR StartTime 2025-03-03 14:06:05 - End Time 2025-03-03 17:06:05 [2025-03-03 17:06:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:06:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599883', 'tblTempUsageDetail_20' ) start [2025-03-03 17:06:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599883', 'tblTempUsageDetail_20' ) end [2025-03-03 17:06:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599883', 'tblTempVendorCDR_20' ) start [2025-03-03 17:06:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599883', 'tblTempVendorCDR_20' ) end [2025-03-03 17:06:22] Production.INFO: ProcessCDR(1,14599883,1,1,2) [2025-03-03 17:06:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599883,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:06:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599883,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:06:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599883,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:06:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599883,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:06:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599883', 'tblTempUsageDetail_20' ) start [2025-03-03 17:06:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599883', 'tblTempUsageDetail_20' ) end [2025-03-03 17:06:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:06:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:06:27] Production.INFO: ==8797== Releasing lock... [2025-03-03 17:06:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:06:27] Production.INFO: 73.5 MB #Memory Used# [2025-03-03 17:07:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:07:05 [end_date_ymd] => 2025-03-03 17:07:05 [RateCDR] => 1 ) [2025-03-03 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-03 14:07:05' and `end` < '2025-03-03 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-03 17:07:19] Production.INFO: count ==6054 [2025-03-03 17:07:22] Production.ERROR: pbx CDR StartTime 2025-03-03 14:07:05 - End Time 2025-03-03 17:07:05 [2025-03-03 17:07:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:07:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599888', 'tblTempUsageDetail_20' ) start [2025-03-03 17:07:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599888', 'tblTempUsageDetail_20' ) end [2025-03-03 17:07:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599888', 'tblTempVendorCDR_20' ) start [2025-03-03 17:07:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599888', 'tblTempVendorCDR_20' ) end [2025-03-03 17:07:22] Production.INFO: ProcessCDR(1,14599888,1,1,2) [2025-03-03 17:07:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599888,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:07:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599888,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:07:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599888,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:07:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599888,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:07:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599888', 'tblTempUsageDetail_20' ) start [2025-03-03 17:07:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599888', 'tblTempUsageDetail_20' ) end [2025-03-03 17:07:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:07:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:07:27] Production.INFO: ==8887== Releasing lock... [2025-03-03 17:07:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:07:27] Production.INFO: 73.25 MB #Memory Used# [2025-03-03 17:08:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:08:06 [end_date_ymd] => 2025-03-03 17:08:06 [RateCDR] => 1 ) [2025-03-03 17:08:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 14:08:06' and `end` < '2025-03-03 17:08:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 17:08:19] Production.INFO: count ==6017 [2025-03-03 17:08:22] Production.ERROR: pbx CDR StartTime 2025-03-03 14:08:06 - End Time 2025-03-03 17:08:06 [2025-03-03 17:08:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:08:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599893', 'tblTempUsageDetail_20' ) start [2025-03-03 17:08:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599893', 'tblTempUsageDetail_20' ) end [2025-03-03 17:08:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599893', 'tblTempVendorCDR_20' ) start [2025-03-03 17:08:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599893', 'tblTempVendorCDR_20' ) end [2025-03-03 17:08:22] Production.INFO: ProcessCDR(1,14599893,1,1,2) [2025-03-03 17:08:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599893,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:08:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599893,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:08:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599893,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:08:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599893,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:08:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599893', 'tblTempUsageDetail_20' ) start [2025-03-03 17:08:28] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599893', 'tblTempUsageDetail_20' ) end [2025-03-03 17:08:28] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:08:28] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:08:28] Production.INFO: ==8971== Releasing lock... [2025-03-03 17:08:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:08:28] Production.INFO: 73 MB #Memory Used# [2025-03-03 17:09:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:09:05 [end_date_ymd] => 2025-03-03 17:09:05 [RateCDR] => 1 ) [2025-03-03 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-03 14:09:05' and `end` < '2025-03-03 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-03 17:09:19] Production.INFO: count ==5981 [2025-03-03 17:09:22] Production.ERROR: pbx CDR StartTime 2025-03-03 14:09:05 - End Time 2025-03-03 17:09:05 [2025-03-03 17:09:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:09:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599898', 'tblTempUsageDetail_20' ) start [2025-03-03 17:09:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599898', 'tblTempUsageDetail_20' ) end [2025-03-03 17:09:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599898', 'tblTempVendorCDR_20' ) start [2025-03-03 17:09:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599898', 'tblTempVendorCDR_20' ) end [2025-03-03 17:09:22] Production.INFO: ProcessCDR(1,14599898,1,1,2) [2025-03-03 17:09:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599898,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:09:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599898,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:09:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599898,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:09:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599898,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:09:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599898', 'tblTempUsageDetail_20' ) start [2025-03-03 17:09:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599898', 'tblTempUsageDetail_20' ) end [2025-03-03 17:09:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:09:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:09:27] Production.INFO: ==9046== Releasing lock... [2025-03-03 17:09:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:09:27] Production.INFO: 72.75 MB #Memory Used# [2025-03-03 17:10:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:10:06 [end_date_ymd] => 2025-03-03 17:10:06 [RateCDR] => 1 ) [2025-03-03 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-03 14:10:06' and `end` < '2025-03-03 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-03 17:10:20] Production.INFO: count ==5954 [2025-03-03 17:10:22] Production.ERROR: pbx CDR StartTime 2025-03-03 14:10:06 - End Time 2025-03-03 17:10:06 [2025-03-03 17:10:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:10:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599904', 'tblTempUsageDetail_20' ) start [2025-03-03 17:10:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599904', 'tblTempUsageDetail_20' ) end [2025-03-03 17:10:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599904', 'tblTempVendorCDR_20' ) start [2025-03-03 17:10:23] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599904', 'tblTempVendorCDR_20' ) end [2025-03-03 17:10:23] Production.INFO: ProcessCDR(1,14599904,1,1,2) [2025-03-03 17:10:23] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599904,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:10:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599904,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:10:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599904,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:10:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599904,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:10:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599904', 'tblTempUsageDetail_20' ) start [2025-03-03 17:10:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599904', 'tblTempUsageDetail_20' ) end [2025-03-03 17:10:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:10:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:10:27] Production.INFO: ==9126== Releasing lock... [2025-03-03 17:10:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:10:27] Production.INFO: 72.5 MB #Memory Used# [2025-03-03 17:11:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:11:05 [end_date_ymd] => 2025-03-03 17:11:05 [RateCDR] => 1 ) [2025-03-03 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-03 14:11:05' and `end` < '2025-03-03 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-03 17:11:18] Production.INFO: count ==5900 [2025-03-03 17:11:21] Production.ERROR: pbx CDR StartTime 2025-03-03 14:11:05 - End Time 2025-03-03 17:11:05 [2025-03-03 17:11:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:11:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599909', 'tblTempUsageDetail_20' ) start [2025-03-03 17:11:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599909', 'tblTempUsageDetail_20' ) end [2025-03-03 17:11:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599909', 'tblTempVendorCDR_20' ) start [2025-03-03 17:11:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599909', 'tblTempVendorCDR_20' ) end [2025-03-03 17:11:21] Production.INFO: ProcessCDR(1,14599909,1,1,2) [2025-03-03 17:11:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599909,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:11:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599909,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:11:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599909,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:11:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599909,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:11:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599909', 'tblTempUsageDetail_20' ) start [2025-03-03 17:11:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599909', 'tblTempUsageDetail_20' ) end [2025-03-03 17:11:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:11:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:11:26] Production.INFO: ==9208== Releasing lock... [2025-03-03 17:11:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:11:26] Production.INFO: 72.5 MB #Memory Used# [2025-03-03 17:12:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:12:05 [end_date_ymd] => 2025-03-03 17:12:05 [RateCDR] => 1 ) [2025-03-03 17:12:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 14:12:05' and `end` < '2025-03-03 17:12:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 17:12:19] Production.INFO: count ==5884 [2025-03-03 17:12:22] Production.ERROR: pbx CDR StartTime 2025-03-03 14:12:05 - End Time 2025-03-03 17:12:05 [2025-03-03 17:12:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:12:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599914', 'tblTempUsageDetail_20' ) start [2025-03-03 17:12:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599914', 'tblTempUsageDetail_20' ) end [2025-03-03 17:12:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599914', 'tblTempVendorCDR_20' ) start [2025-03-03 17:12:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599914', 'tblTempVendorCDR_20' ) end [2025-03-03 17:12:22] Production.INFO: ProcessCDR(1,14599914,1,1,2) [2025-03-03 17:12:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599914,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:12:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599914,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:12:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599914,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:12:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599914,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:12:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599914', 'tblTempUsageDetail_20' ) start [2025-03-03 17:12:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599914', 'tblTempUsageDetail_20' ) end [2025-03-03 17:12:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:12:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:12:27] Production.INFO: ==9282== Releasing lock... [2025-03-03 17:12:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:12:27] Production.INFO: 72 MB #Memory Used# [2025-03-03 17:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:13:05 [end_date_ymd] => 2025-03-03 17:13:05 [RateCDR] => 1 ) [2025-03-03 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-03 14:13:05' and `end` < '2025-03-03 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-03 17:13:18] Production.INFO: count ==5863 [2025-03-03 17:13:21] Production.ERROR: pbx CDR StartTime 2025-03-03 14:13:05 - End Time 2025-03-03 17:13:05 [2025-03-03 17:13:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:13:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599919', 'tblTempUsageDetail_20' ) start [2025-03-03 17:13:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599919', 'tblTempUsageDetail_20' ) end [2025-03-03 17:13:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599919', 'tblTempVendorCDR_20' ) start [2025-03-03 17:13:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599919', 'tblTempVendorCDR_20' ) end [2025-03-03 17:13:21] Production.INFO: ProcessCDR(1,14599919,1,1,2) [2025-03-03 17:13:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599919,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:13:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599919,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:13:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599919,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:13:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599919,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:13:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599919', 'tblTempUsageDetail_20' ) start [2025-03-03 17:13:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599919', 'tblTempUsageDetail_20' ) end [2025-03-03 17:13:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:13:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:13:26] Production.INFO: ==9356== Releasing lock... [2025-03-03 17:13:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:13:26] Production.INFO: 72 MB #Memory Used# [2025-03-03 17:14:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:14:05 [end_date_ymd] => 2025-03-03 17:14:05 [RateCDR] => 1 ) [2025-03-03 17:14:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 14:14:05' and `end` < '2025-03-03 17:14:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 17:14:18] Production.INFO: count ==5840 [2025-03-03 17:14:21] Production.ERROR: pbx CDR StartTime 2025-03-03 14:14:05 - End Time 2025-03-03 17:14:05 [2025-03-03 17:14:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:14:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599924', 'tblTempUsageDetail_20' ) start [2025-03-03 17:14:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599924', 'tblTempUsageDetail_20' ) end [2025-03-03 17:14:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599924', 'tblTempVendorCDR_20' ) start [2025-03-03 17:14:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599924', 'tblTempVendorCDR_20' ) end [2025-03-03 17:14:21] Production.INFO: ProcessCDR(1,14599924,1,1,2) [2025-03-03 17:14:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599924,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:14:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599924,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:14:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599924,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:14:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599924,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:14:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599924', 'tblTempUsageDetail_20' ) start [2025-03-03 17:14:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599924', 'tblTempUsageDetail_20' ) end [2025-03-03 17:14:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:14:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:14:27] Production.INFO: ==9428== Releasing lock... [2025-03-03 17:14:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:14:27] Production.INFO: 71.75 MB #Memory Used# [2025-03-03 17:15:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:15:05 [end_date_ymd] => 2025-03-03 17:15:05 [RateCDR] => 1 ) [2025-03-03 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-03 14:15:05' and `end` < '2025-03-03 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-03 17:15:18] Production.INFO: count ==5823 [2025-03-03 17:15:21] Production.ERROR: pbx CDR StartTime 2025-03-03 14:15:05 - End Time 2025-03-03 17:15:05 [2025-03-03 17:15:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:15:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599929', 'tblTempUsageDetail_20' ) start [2025-03-03 17:15:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599929', 'tblTempUsageDetail_20' ) end [2025-03-03 17:15:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599929', 'tblTempVendorCDR_20' ) start [2025-03-03 17:15:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599929', 'tblTempVendorCDR_20' ) end [2025-03-03 17:15:21] Production.INFO: ProcessCDR(1,14599929,1,1,2) [2025-03-03 17:15:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599929,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:15:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599929,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:15:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599929,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:15:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599929,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:15:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599929', 'tblTempUsageDetail_20' ) start [2025-03-03 17:15:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599929', 'tblTempUsageDetail_20' ) end [2025-03-03 17:15:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:15:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:15:24] Production.INFO: ==9505== Releasing lock... [2025-03-03 17:15:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:15:24] Production.INFO: 71.5 MB #Memory Used# [2025-03-03 17:16:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:16:05 [end_date_ymd] => 2025-03-03 17:16:05 [RateCDR] => 1 ) [2025-03-03 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-03 14:16:05' and `end` < '2025-03-03 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-03 17:16:18] Production.INFO: count ==5806 [2025-03-03 17:16:21] Production.ERROR: pbx CDR StartTime 2025-03-03 14:16:05 - End Time 2025-03-03 17:16:05 [2025-03-03 17:16:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:16:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599934', 'tblTempUsageDetail_20' ) start [2025-03-03 17:16:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599934', 'tblTempUsageDetail_20' ) end [2025-03-03 17:16:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599934', 'tblTempVendorCDR_20' ) start [2025-03-03 17:16:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599934', 'tblTempVendorCDR_20' ) end [2025-03-03 17:16:21] Production.INFO: ProcessCDR(1,14599934,1,1,2) [2025-03-03 17:16:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599934,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:16:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599934,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:16:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599934,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:16:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599934,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:16:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599934', 'tblTempUsageDetail_20' ) start [2025-03-03 17:16:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599934', 'tblTempUsageDetail_20' ) end [2025-03-03 17:16:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:16:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:16:26] Production.INFO: ==9576== Releasing lock... [2025-03-03 17:16:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:16:26] Production.INFO: 71.5 MB #Memory Used# [2025-03-03 17:17:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:17:05 [end_date_ymd] => 2025-03-03 17:17:05 [RateCDR] => 1 ) [2025-03-03 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-03 14:17:05' and `end` < '2025-03-03 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-03 17:17:18] Production.INFO: count ==5800 [2025-03-03 17:17:21] Production.ERROR: pbx CDR StartTime 2025-03-03 14:17:05 - End Time 2025-03-03 17:17:05 [2025-03-03 17:17:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:17:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599939', 'tblTempUsageDetail_20' ) start [2025-03-03 17:17:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599939', 'tblTempUsageDetail_20' ) end [2025-03-03 17:17:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599939', 'tblTempVendorCDR_20' ) start [2025-03-03 17:17:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599939', 'tblTempVendorCDR_20' ) end [2025-03-03 17:17:21] Production.INFO: ProcessCDR(1,14599939,1,1,2) [2025-03-03 17:17:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599939,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:17:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599939,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:17:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599939,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:17:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599939,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:17:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599939', 'tblTempUsageDetail_20' ) start [2025-03-03 17:17:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599939', 'tblTempUsageDetail_20' ) end [2025-03-03 17:17:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:17:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:17:26] Production.INFO: ==9646== Releasing lock... [2025-03-03 17:17:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:17:26] Production.INFO: 71.5 MB #Memory Used# [2025-03-03 17:18:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:18:05 [end_date_ymd] => 2025-03-03 17:18:05 [RateCDR] => 1 ) [2025-03-03 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-03 14:18:05' and `end` < '2025-03-03 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-03 17:18:18] Production.INFO: count ==5802 [2025-03-03 17:18:21] Production.ERROR: pbx CDR StartTime 2025-03-03 14:18:05 - End Time 2025-03-03 17:18:05 [2025-03-03 17:18:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:18:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599944', 'tblTempUsageDetail_20' ) start [2025-03-03 17:18:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599944', 'tblTempUsageDetail_20' ) end [2025-03-03 17:18:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599944', 'tblTempVendorCDR_20' ) start [2025-03-03 17:18:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599944', 'tblTempVendorCDR_20' ) end [2025-03-03 17:18:21] Production.INFO: ProcessCDR(1,14599944,1,1,2) [2025-03-03 17:18:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599944,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:18:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599944,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:18:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599944,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:18:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599944,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:18:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599944', 'tblTempUsageDetail_20' ) start [2025-03-03 17:18:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599944', 'tblTempUsageDetail_20' ) end [2025-03-03 17:18:25] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:18:25] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:18:25] Production.INFO: ==9715== Releasing lock... [2025-03-03 17:18:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:18:25] Production.INFO: 71.5 MB #Memory Used# [2025-03-03 17:19:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:19:05 [end_date_ymd] => 2025-03-03 17:19:05 [RateCDR] => 1 ) [2025-03-03 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-03 14:19:05' and `end` < '2025-03-03 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-03 17:19:19] Production.INFO: count ==5787 [2025-03-03 17:19:22] Production.ERROR: pbx CDR StartTime 2025-03-03 14:19:05 - End Time 2025-03-03 17:19:05 [2025-03-03 17:19:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:19:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599949', 'tblTempUsageDetail_20' ) start [2025-03-03 17:19:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599949', 'tblTempUsageDetail_20' ) end [2025-03-03 17:19:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599949', 'tblTempVendorCDR_20' ) start [2025-03-03 17:19:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599949', 'tblTempVendorCDR_20' ) end [2025-03-03 17:19:22] Production.INFO: ProcessCDR(1,14599949,1,1,2) [2025-03-03 17:19:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599949,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:19:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599949,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:19:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599949,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:19:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599949,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:19:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599949', 'tblTempUsageDetail_20' ) start [2025-03-03 17:19:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599949', 'tblTempUsageDetail_20' ) end [2025-03-03 17:19:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:19:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:19:27] Production.INFO: ==9787== Releasing lock... [2025-03-03 17:19:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:19:27] Production.INFO: 71.25 MB #Memory Used# [2025-03-03 17:20:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:20:06 [end_date_ymd] => 2025-03-03 17:20:06 [RateCDR] => 1 ) [2025-03-03 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-03 14:20:06' and `end` < '2025-03-03 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-03 17:20:19] Production.INFO: count ==5775 [2025-03-03 17:20:22] Production.ERROR: pbx CDR StartTime 2025-03-03 14:20:06 - End Time 2025-03-03 17:20:06 [2025-03-03 17:20:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:20:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599955', 'tblTempUsageDetail_20' ) start [2025-03-03 17:20:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599955', 'tblTempUsageDetail_20' ) end [2025-03-03 17:20:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599955', 'tblTempVendorCDR_20' ) start [2025-03-03 17:20:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599955', 'tblTempVendorCDR_20' ) end [2025-03-03 17:20:22] Production.INFO: ProcessCDR(1,14599955,1,1,2) [2025-03-03 17:20:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599955,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:20:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599955,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:20:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599955,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:20:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599955,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:20:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599955', 'tblTempUsageDetail_20' ) start [2025-03-03 17:20:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599955', 'tblTempUsageDetail_20' ) end [2025-03-03 17:20:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:20:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:20:27] Production.INFO: ==9861== Releasing lock... [2025-03-03 17:20:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:20:27] Production.INFO: 71.25 MB #Memory Used# [2025-03-03 17:21:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:21:06 [end_date_ymd] => 2025-03-03 17:21:06 [RateCDR] => 1 ) [2025-03-03 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-03 14:21:06' and `end` < '2025-03-03 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-03 17:21:19] Production.INFO: count ==5791 [2025-03-03 17:21:22] Production.ERROR: pbx CDR StartTime 2025-03-03 14:21:06 - End Time 2025-03-03 17:21:06 [2025-03-03 17:21:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:21:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599960', 'tblTempUsageDetail_20' ) start [2025-03-03 17:21:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599960', 'tblTempUsageDetail_20' ) end [2025-03-03 17:21:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599960', 'tblTempVendorCDR_20' ) start [2025-03-03 17:21:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599960', 'tblTempVendorCDR_20' ) end [2025-03-03 17:21:22] Production.INFO: ProcessCDR(1,14599960,1,1,2) [2025-03-03 17:21:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599960,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:21:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599960,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:21:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599960,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:21:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599960,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:21:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599960', 'tblTempUsageDetail_20' ) start [2025-03-03 17:21:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599960', 'tblTempUsageDetail_20' ) end [2025-03-03 17:21:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:21:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:21:27] Production.INFO: ==9981== Releasing lock... [2025-03-03 17:21:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:21:27] Production.INFO: 71.25 MB #Memory Used# [2025-03-03 17:22:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:22:05 [end_date_ymd] => 2025-03-03 17:22:05 [RateCDR] => 1 ) [2025-03-03 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-03 14:22:05' and `end` < '2025-03-03 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-03 17:22:18] Production.INFO: count ==5789 [2025-03-03 17:22:20] Production.ERROR: pbx CDR StartTime 2025-03-03 14:22:05 - End Time 2025-03-03 17:22:05 [2025-03-03 17:22:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:22:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599965', 'tblTempUsageDetail_20' ) start [2025-03-03 17:22:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599965', 'tblTempUsageDetail_20' ) end [2025-03-03 17:22:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599965', 'tblTempVendorCDR_20' ) start [2025-03-03 17:22:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599965', 'tblTempVendorCDR_20' ) end [2025-03-03 17:22:21] Production.INFO: ProcessCDR(1,14599965,1,1,2) [2025-03-03 17:22:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599965,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:22:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599965,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:22:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599965,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:22:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599965,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:22:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599965', 'tblTempUsageDetail_20' ) start [2025-03-03 17:22:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599965', 'tblTempUsageDetail_20' ) end [2025-03-03 17:22:25] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:22:25] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:22:25] Production.INFO: ==10051== Releasing lock... [2025-03-03 17:22:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:22:25] Production.INFO: 71.25 MB #Memory Used# [2025-03-03 17:23:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:23:05 [end_date_ymd] => 2025-03-03 17:23:05 [RateCDR] => 1 ) [2025-03-03 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-03 14:23:05' and `end` < '2025-03-03 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-03 17:23:18] Production.INFO: count ==5775 [2025-03-03 17:23:21] Production.ERROR: pbx CDR StartTime 2025-03-03 14:23:05 - End Time 2025-03-03 17:23:05 [2025-03-03 17:23:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:23:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599970', 'tblTempUsageDetail_20' ) start [2025-03-03 17:23:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599970', 'tblTempUsageDetail_20' ) end [2025-03-03 17:23:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599970', 'tblTempVendorCDR_20' ) start [2025-03-03 17:23:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599970', 'tblTempVendorCDR_20' ) end [2025-03-03 17:23:21] Production.INFO: ProcessCDR(1,14599970,1,1,2) [2025-03-03 17:23:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599970,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:23:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599970,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:23:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599970,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:23:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599970,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:23:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599970', 'tblTempUsageDetail_20' ) start [2025-03-03 17:23:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599970', 'tblTempUsageDetail_20' ) end [2025-03-03 17:23:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:23:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:23:26] Production.INFO: ==10123== Releasing lock... [2025-03-03 17:23:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:23:26] Production.INFO: 71.25 MB #Memory Used# [2025-03-03 17:24:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:24:05 [end_date_ymd] => 2025-03-03 17:24:05 [RateCDR] => 1 ) [2025-03-03 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-03 14:24:05' and `end` < '2025-03-03 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-03 17:24:19] Production.INFO: count ==5770 [2025-03-03 17:24:22] Production.ERROR: pbx CDR StartTime 2025-03-03 14:24:05 - End Time 2025-03-03 17:24:05 [2025-03-03 17:24:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:24:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599975', 'tblTempUsageDetail_20' ) start [2025-03-03 17:24:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599975', 'tblTempUsageDetail_20' ) end [2025-03-03 17:24:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599975', 'tblTempVendorCDR_20' ) start [2025-03-03 17:24:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599975', 'tblTempVendorCDR_20' ) end [2025-03-03 17:24:22] Production.INFO: ProcessCDR(1,14599975,1,1,2) [2025-03-03 17:24:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599975,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:24:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599975,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:24:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599975,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:24:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599975,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:24:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599975', 'tblTempUsageDetail_20' ) start [2025-03-03 17:24:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599975', 'tblTempUsageDetail_20' ) end [2025-03-03 17:24:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:24:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:24:27] Production.INFO: ==10192== Releasing lock... [2025-03-03 17:24:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:24:27] Production.INFO: 71.25 MB #Memory Used# [2025-03-03 17:25:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:25:05 [end_date_ymd] => 2025-03-03 17:25:05 [RateCDR] => 1 ) [2025-03-03 17:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 14:25:05' and `end` < '2025-03-03 17:25:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 17:25:18] Production.INFO: count ==5770 [2025-03-03 17:25:21] Production.ERROR: pbx CDR StartTime 2025-03-03 14:25:05 - End Time 2025-03-03 17:25:05 [2025-03-03 17:25:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:25:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599980', 'tblTempUsageDetail_20' ) start [2025-03-03 17:25:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599980', 'tblTempUsageDetail_20' ) end [2025-03-03 17:25:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599980', 'tblTempVendorCDR_20' ) start [2025-03-03 17:25:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599980', 'tblTempVendorCDR_20' ) end [2025-03-03 17:25:21] Production.INFO: ProcessCDR(1,14599980,1,1,2) [2025-03-03 17:25:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599980,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:25:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599980,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:25:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599980,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:25:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599980,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:25:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599980', 'tblTempUsageDetail_20' ) start [2025-03-03 17:25:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599980', 'tblTempUsageDetail_20' ) end [2025-03-03 17:25:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:25:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:25:27] Production.INFO: ==10263== Releasing lock... [2025-03-03 17:25:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:25:27] Production.INFO: 71.25 MB #Memory Used# [2025-03-03 17:26:19] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:26:19 [end_date_ymd] => 2025-03-03 17:26:19 [RateCDR] => 1 ) [2025-03-03 17:26:19] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 14:26:19' and `end` < '2025-03-03 17:26:19' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 17:26:33] Production.INFO: count ==5788 [2025-03-03 17:27:44] Production.ERROR: pbx CDR StartTime 2025-03-03 14:26:19 - End Time 2025-03-03 17:26:19 [2025-03-03 17:27:44] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:27:44] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599985', 'tblTempUsageDetail_20' ) start [2025-03-03 17:27:54] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599985', 'tblTempUsageDetail_20' ) end [2025-03-03 17:27:54] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599985', 'tblTempVendorCDR_20' ) start [2025-03-03 17:27:56] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599985', 'tblTempVendorCDR_20' ) end [2025-03-03 17:27:56] Production.INFO: ProcessCDR(1,14599985,1,1,2) [2025-03-03 17:27:56] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599985,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:28:11] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599985,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:28:11] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599985,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:28:41] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599985,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:28:41] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599985', 'tblTempUsageDetail_20' ) start [2025-03-03 17:28:49] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599985', 'tblTempUsageDetail_20' ) end [2025-03-03 17:28:49] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:28:49] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:28:56] Production.INFO: ==10336== Releasing lock... [2025-03-03 17:28:56] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:28:56] Production.INFO: 71.25 MB #Memory Used# [2025-03-03 17:29:26] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:29:26 [end_date_ymd] => 2025-03-03 17:29:26 [RateCDR] => 1 ) [2025-03-03 17:29:26] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 14:29:26' and `end` < '2025-03-03 17:29:26' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 17:29:39] Production.INFO: count ==5752 [2025-03-03 17:30:26] Production.ERROR: pbx CDR StartTime 2025-03-03 14:29:26 - End Time 2025-03-03 17:29:26 [2025-03-03 17:30:26] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:30:26] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599996', 'tblTempUsageDetail_20' ) start [2025-03-03 17:30:32] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14599996', 'tblTempUsageDetail_20' ) end [2025-03-03 17:30:32] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599996', 'tblTempVendorCDR_20' ) start [2025-03-03 17:30:33] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14599996', 'tblTempVendorCDR_20' ) end [2025-03-03 17:30:33] Production.INFO: ProcessCDR(1,14599996,1,1,2) [2025-03-03 17:30:33] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14599996,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:30:40] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14599996,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:30:40] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14599996,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:30:54] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14599996,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:30:54] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599996', 'tblTempUsageDetail_20' ) start [2025-03-03 17:31:00] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14599996', 'tblTempUsageDetail_20' ) end [2025-03-03 17:31:00] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:31:00] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:31:05] Production.INFO: ==10533== Releasing lock... [2025-03-03 17:31:05] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:31:05] Production.INFO: 71 MB #Memory Used# [2025-03-03 17:32:26] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:32:26 [end_date_ymd] => 2025-03-03 17:32:26 [RateCDR] => 1 ) [2025-03-03 17:32:26] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 14:32:26' and `end` < '2025-03-03 17:32:26' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 17:32:39] Production.INFO: count ==5680 [2025-03-03 17:32:45] Production.ERROR: pbx CDR StartTime 2025-03-03 14:32:26 - End Time 2025-03-03 17:32:26 [2025-03-03 17:32:45] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:32:45] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600008', 'tblTempUsageDetail_20' ) start [2025-03-03 17:32:45] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600008', 'tblTempUsageDetail_20' ) end [2025-03-03 17:32:45] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600008', 'tblTempVendorCDR_20' ) start [2025-03-03 17:32:45] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600008', 'tblTempVendorCDR_20' ) end [2025-03-03 17:32:45] Production.INFO: ProcessCDR(1,14600008,1,1,2) [2025-03-03 17:32:45] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600008,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:32:48] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600008,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:32:48] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600008,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:32:51] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600008,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:32:51] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600008', 'tblTempUsageDetail_20' ) start [2025-03-03 17:32:51] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600008', 'tblTempUsageDetail_20' ) end [2025-03-03 17:32:51] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:32:51] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:32:51] Production.INFO: ==10740== Releasing lock... [2025-03-03 17:32:51] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:32:51] Production.INFO: 70.5 MB #Memory Used# [2025-03-03 17:33:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:33:06 [end_date_ymd] => 2025-03-03 17:33:06 [RateCDR] => 1 ) [2025-03-03 17: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-03 14:33:06' and `end` < '2025-03-03 17: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-03 17:33:19] Production.INFO: count ==5670 [2025-03-03 17:33:21] Production.ERROR: pbx CDR StartTime 2025-03-03 14:33:06 - End Time 2025-03-03 17:33:06 [2025-03-03 17:33:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:33:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600013', 'tblTempUsageDetail_20' ) start [2025-03-03 17:33:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600013', 'tblTempUsageDetail_20' ) end [2025-03-03 17:33:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600013', 'tblTempVendorCDR_20' ) start [2025-03-03 17:33:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600013', 'tblTempVendorCDR_20' ) end [2025-03-03 17:33:22] Production.INFO: ProcessCDR(1,14600013,1,1,2) [2025-03-03 17:33:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600013,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:33:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600013,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:33:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600013,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:33:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600013,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:33:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600013', 'tblTempUsageDetail_20' ) start [2025-03-03 17:33:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600013', 'tblTempUsageDetail_20' ) end [2025-03-03 17:33:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:33:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:33:27] Production.INFO: ==10815== Releasing lock... [2025-03-03 17:33:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:33:27] Production.INFO: 70.5 MB #Memory Used# [2025-03-03 17:34:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:34:05 [end_date_ymd] => 2025-03-03 17:34:05 [RateCDR] => 1 ) [2025-03-03 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-03 14:34:05' and `end` < '2025-03-03 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-03 17:34:18] Production.INFO: count ==5669 [2025-03-03 17:34:20] Production.ERROR: pbx CDR StartTime 2025-03-03 14:34:05 - End Time 2025-03-03 17:34:05 [2025-03-03 17:34:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:34:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600018', 'tblTempUsageDetail_20' ) start [2025-03-03 17:34:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600018', 'tblTempUsageDetail_20' ) end [2025-03-03 17:34:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600018', 'tblTempVendorCDR_20' ) start [2025-03-03 17:34:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600018', 'tblTempVendorCDR_20' ) end [2025-03-03 17:34:21] Production.INFO: ProcessCDR(1,14600018,1,1,2) [2025-03-03 17:34:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600018,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:34:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600018,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:34:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600018,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:34:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600018,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:34:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600018', 'tblTempUsageDetail_20' ) start [2025-03-03 17:34:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600018', 'tblTempUsageDetail_20' ) end [2025-03-03 17:34:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:34:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:34:26] Production.INFO: ==10887== Releasing lock... [2025-03-03 17:34:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:34:26] Production.INFO: 70.5 MB #Memory Used# [2025-03-03 17:35:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:35:05 [end_date_ymd] => 2025-03-03 17:35:05 [RateCDR] => 1 ) [2025-03-03 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-03 14:35:05' and `end` < '2025-03-03 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-03 17:35:18] Production.INFO: count ==5634 [2025-03-03 17:35:21] Production.ERROR: pbx CDR StartTime 2025-03-03 14:35:05 - End Time 2025-03-03 17:35:05 [2025-03-03 17:35:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:35:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600023', 'tblTempUsageDetail_20' ) start [2025-03-03 17:35:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600023', 'tblTempUsageDetail_20' ) end [2025-03-03 17:35:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600023', 'tblTempVendorCDR_20' ) start [2025-03-03 17:35:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600023', 'tblTempVendorCDR_20' ) end [2025-03-03 17:35:21] Production.INFO: ProcessCDR(1,14600023,1,1,2) [2025-03-03 17:35:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600023,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:35:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600023,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:35:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600023,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:35:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600023,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:35:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600023', 'tblTempUsageDetail_20' ) start [2025-03-03 17:35:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600023', 'tblTempUsageDetail_20' ) end [2025-03-03 17:35:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:35:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:35:26] Production.INFO: ==10960== Releasing lock... [2025-03-03 17:35:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:35:26] Production.INFO: 70.25 MB #Memory Used# [2025-03-03 17:36:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:36:06 [end_date_ymd] => 2025-03-03 17:36:06 [RateCDR] => 1 ) [2025-03-03 17:36:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 14:36:06' and `end` < '2025-03-03 17:36:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 17:36:19] Production.INFO: count ==5602 [2025-03-03 17:36:22] Production.ERROR: pbx CDR StartTime 2025-03-03 14:36:06 - End Time 2025-03-03 17:36:06 [2025-03-03 17:36:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:36:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600028', 'tblTempUsageDetail_20' ) start [2025-03-03 17:36:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600028', 'tblTempUsageDetail_20' ) end [2025-03-03 17:36:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600028', 'tblTempVendorCDR_20' ) start [2025-03-03 17:36:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600028', 'tblTempVendorCDR_20' ) end [2025-03-03 17:36:22] Production.INFO: ProcessCDR(1,14600028,1,1,2) [2025-03-03 17:36:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600028,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:36:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600028,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:36:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600028,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:36:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600028,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:36:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600028', 'tblTempUsageDetail_20' ) start [2025-03-03 17:36:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600028', 'tblTempUsageDetail_20' ) end [2025-03-03 17:36:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:36:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:36:27] Production.INFO: ==11073== Releasing lock... [2025-03-03 17:36:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:36:27] Production.INFO: 70 MB #Memory Used# [2025-03-03 17:37:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:37:05 [end_date_ymd] => 2025-03-03 17:37:05 [RateCDR] => 1 ) [2025-03-03 17:37:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 14:37:05' and `end` < '2025-03-03 17:37:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 17:37:18] Production.INFO: count ==5554 [2025-03-03 17:37:21] Production.ERROR: pbx CDR StartTime 2025-03-03 14:37:05 - End Time 2025-03-03 17:37:05 [2025-03-03 17:37:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:37:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600033', 'tblTempUsageDetail_20' ) start [2025-03-03 17:37:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600033', 'tblTempUsageDetail_20' ) end [2025-03-03 17:37:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600033', 'tblTempVendorCDR_20' ) start [2025-03-03 17:37:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600033', 'tblTempVendorCDR_20' ) end [2025-03-03 17:37:21] Production.INFO: ProcessCDR(1,14600033,1,1,2) [2025-03-03 17:37:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600033,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:37:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600033,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:37:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600033,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:37:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600033,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:37:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600033', 'tblTempUsageDetail_20' ) start [2025-03-03 17:37:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600033', 'tblTempUsageDetail_20' ) end [2025-03-03 17:37:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:37:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:37:26] Production.INFO: ==11142== Releasing lock... [2025-03-03 17:37:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:37:26] Production.INFO: 69.5 MB #Memory Used# [2025-03-03 17:38:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:38:05 [end_date_ymd] => 2025-03-03 17:38:05 [RateCDR] => 1 ) [2025-03-03 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-03 14:38:05' and `end` < '2025-03-03 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-03 17:38:18] Production.INFO: count ==5533 [2025-03-03 17:38:21] Production.ERROR: pbx CDR StartTime 2025-03-03 14:38:05 - End Time 2025-03-03 17:38:05 [2025-03-03 17:38:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:38:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600038', 'tblTempUsageDetail_20' ) start [2025-03-03 17:38:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600038', 'tblTempUsageDetail_20' ) end [2025-03-03 17:38:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600038', 'tblTempVendorCDR_20' ) start [2025-03-03 17:38:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600038', 'tblTempVendorCDR_20' ) end [2025-03-03 17:38:21] Production.INFO: ProcessCDR(1,14600038,1,1,2) [2025-03-03 17:38:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600038,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:38:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600038,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:38:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600038,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:38:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600038,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:38:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600038', 'tblTempUsageDetail_20' ) start [2025-03-03 17:38:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600038', 'tblTempUsageDetail_20' ) end [2025-03-03 17:38:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:38:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:38:26] Production.INFO: ==11215== Releasing lock... [2025-03-03 17:38:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:38:26] Production.INFO: 69.5 MB #Memory Used# [2025-03-03 17:39:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:39:05 [end_date_ymd] => 2025-03-03 17:39:05 [RateCDR] => 1 ) [2025-03-03 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-03 14:39:05' and `end` < '2025-03-03 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-03 17:39:18] Production.INFO: count ==5513 [2025-03-03 17:39:21] Production.ERROR: pbx CDR StartTime 2025-03-03 14:39:05 - End Time 2025-03-03 17:39:05 [2025-03-03 17:39:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:39:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600043', 'tblTempUsageDetail_20' ) start [2025-03-03 17:39:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600043', 'tblTempUsageDetail_20' ) end [2025-03-03 17:39:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600043', 'tblTempVendorCDR_20' ) start [2025-03-03 17:39:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600043', 'tblTempVendorCDR_20' ) end [2025-03-03 17:39:21] Production.INFO: ProcessCDR(1,14600043,1,1,2) [2025-03-03 17:39:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600043,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:39:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600043,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:39:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600043,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:39:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600043,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:39:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600043', 'tblTempUsageDetail_20' ) start [2025-03-03 17:39:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600043', 'tblTempUsageDetail_20' ) end [2025-03-03 17:39:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:39:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:39:26] Production.INFO: ==11287== Releasing lock... [2025-03-03 17:39:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:39:26] Production.INFO: 69.25 MB #Memory Used# [2025-03-03 17:40:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:40:06 [end_date_ymd] => 2025-03-03 17:40:06 [RateCDR] => 1 ) [2025-03-03 17:40:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 14:40:06' and `end` < '2025-03-03 17:40:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 17:40:19] Production.INFO: count ==5495 [2025-03-03 17:40:22] Production.ERROR: pbx CDR StartTime 2025-03-03 14:40:06 - End Time 2025-03-03 17:40:06 [2025-03-03 17:40:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:40:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600049', 'tblTempUsageDetail_20' ) start [2025-03-03 17:40:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600049', 'tblTempUsageDetail_20' ) end [2025-03-03 17:40:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600049', 'tblTempVendorCDR_20' ) start [2025-03-03 17:40:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600049', 'tblTempVendorCDR_20' ) end [2025-03-03 17:40:22] Production.INFO: ProcessCDR(1,14600049,1,1,2) [2025-03-03 17:40:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600049,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:40:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600049,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:40:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600049,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:40:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600049,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:40:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600049', 'tblTempUsageDetail_20' ) start [2025-03-03 17:40:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600049', 'tblTempUsageDetail_20' ) end [2025-03-03 17:40:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:40:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:40:27] Production.INFO: ==11359== Releasing lock... [2025-03-03 17:40:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:40:27] Production.INFO: 69.25 MB #Memory Used# [2025-03-03 17:41:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:41:05 [end_date_ymd] => 2025-03-03 17:41:05 [RateCDR] => 1 ) [2025-03-03 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-03 14:41:05' and `end` < '2025-03-03 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-03 17:41:18] Production.INFO: count ==5438 [2025-03-03 17:41:21] Production.ERROR: pbx CDR StartTime 2025-03-03 14:41:05 - End Time 2025-03-03 17:41:05 [2025-03-03 17:41:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:41:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600054', 'tblTempUsageDetail_20' ) start [2025-03-03 17:41:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600054', 'tblTempUsageDetail_20' ) end [2025-03-03 17:41:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600054', 'tblTempVendorCDR_20' ) start [2025-03-03 17:41:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600054', 'tblTempVendorCDR_20' ) end [2025-03-03 17:41:21] Production.INFO: ProcessCDR(1,14600054,1,1,2) [2025-03-03 17:41:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600054,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:41:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600054,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:41:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600054,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:41:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600054,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:41:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600054', 'tblTempUsageDetail_20' ) start [2025-03-03 17:41:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600054', 'tblTempUsageDetail_20' ) end [2025-03-03 17:41:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:41:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:41:24] Production.INFO: ==11433== Releasing lock... [2025-03-03 17:41:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:41:24] Production.INFO: 68.75 MB #Memory Used# [2025-03-03 17:42:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:42:05 [end_date_ymd] => 2025-03-03 17:42:05 [RateCDR] => 1 ) [2025-03-03 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-03 14:42:05' and `end` < '2025-03-03 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-03 17:42:18] Production.INFO: count ==5440 [2025-03-03 17:42:21] Production.ERROR: pbx CDR StartTime 2025-03-03 14:42:05 - End Time 2025-03-03 17:42:05 [2025-03-03 17:42:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:42:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600059', 'tblTempUsageDetail_20' ) start [2025-03-03 17:42:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600059', 'tblTempUsageDetail_20' ) end [2025-03-03 17:42:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600059', 'tblTempVendorCDR_20' ) start [2025-03-03 17:42:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600059', 'tblTempVendorCDR_20' ) end [2025-03-03 17:42:21] Production.INFO: ProcessCDR(1,14600059,1,1,2) [2025-03-03 17:42:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600059,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:42:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600059,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:42:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600059,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:42:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600059,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:42:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600059', 'tblTempUsageDetail_20' ) start [2025-03-03 17:42:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600059', 'tblTempUsageDetail_20' ) end [2025-03-03 17:42:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:42:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:42:26] Production.INFO: ==11503== Releasing lock... [2025-03-03 17:42:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:42:26] Production.INFO: 68.75 MB #Memory Used# [2025-03-03 17:43:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:43:05 [end_date_ymd] => 2025-03-03 17:43:05 [RateCDR] => 1 ) [2025-03-03 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-03 14:43:05' and `end` < '2025-03-03 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-03 17:43:18] Production.INFO: count ==5416 [2025-03-03 17:43:20] Production.ERROR: pbx CDR StartTime 2025-03-03 14:43:05 - End Time 2025-03-03 17:43:05 [2025-03-03 17:43:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:43:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600064', 'tblTempUsageDetail_20' ) start [2025-03-03 17:43:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600064', 'tblTempUsageDetail_20' ) end [2025-03-03 17:43:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600064', 'tblTempVendorCDR_20' ) start [2025-03-03 17:43:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600064', 'tblTempVendorCDR_20' ) end [2025-03-03 17:43:21] Production.INFO: ProcessCDR(1,14600064,1,1,2) [2025-03-03 17:43:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600064,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:43:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600064,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:43:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600064,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:43:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600064,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:43:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600064', 'tblTempUsageDetail_20' ) start [2025-03-03 17:43:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600064', 'tblTempUsageDetail_20' ) end [2025-03-03 17:43:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:43:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:43:26] Production.INFO: ==11576== Releasing lock... [2025-03-03 17:43:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:43:26] Production.INFO: 68.5 MB #Memory Used# [2025-03-03 17:44:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:44:05 [end_date_ymd] => 2025-03-03 17:44:05 [RateCDR] => 1 ) [2025-03-03 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-03 14:44:05' and `end` < '2025-03-03 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-03 17:44:18] Production.INFO: count ==5364 [2025-03-03 17:44:21] Production.ERROR: pbx CDR StartTime 2025-03-03 14:44:05 - End Time 2025-03-03 17:44:05 [2025-03-03 17:44:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:44:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600069', 'tblTempUsageDetail_20' ) start [2025-03-03 17:44:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600069', 'tblTempUsageDetail_20' ) end [2025-03-03 17:44:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600069', 'tblTempVendorCDR_20' ) start [2025-03-03 17:44:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600069', 'tblTempVendorCDR_20' ) end [2025-03-03 17:44:21] Production.INFO: ProcessCDR(1,14600069,1,1,2) [2025-03-03 17:44:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600069,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:44:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600069,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:44:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600069,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:44:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600069,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:44:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600069', 'tblTempUsageDetail_20' ) start [2025-03-03 17:44:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600069', 'tblTempUsageDetail_20' ) end [2025-03-03 17:44:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:44:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:44:26] Production.INFO: ==11648== Releasing lock... [2025-03-03 17:44:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:44:26] Production.INFO: 68.25 MB #Memory Used# [2025-03-03 17:45:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:45:05 [end_date_ymd] => 2025-03-03 17:45:05 [RateCDR] => 1 ) [2025-03-03 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-03 14:45:05' and `end` < '2025-03-03 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-03 17:45:18] Production.INFO: count ==5338 [2025-03-03 17:45:20] Production.ERROR: pbx CDR StartTime 2025-03-03 14:45:05 - End Time 2025-03-03 17:45:05 [2025-03-03 17:45:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:45:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600074', 'tblTempUsageDetail_20' ) start [2025-03-03 17:45:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600074', 'tblTempUsageDetail_20' ) end [2025-03-03 17:45:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600074', 'tblTempVendorCDR_20' ) start [2025-03-03 17:45:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600074', 'tblTempVendorCDR_20' ) end [2025-03-03 17:45:21] Production.INFO: ProcessCDR(1,14600074,1,1,2) [2025-03-03 17:45:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600074,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:45:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600074,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:45:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600074,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:45:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600074,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:45:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600074', 'tblTempUsageDetail_20' ) start [2025-03-03 17:45:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600074', 'tblTempUsageDetail_20' ) end [2025-03-03 17:45:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:45:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:45:26] Production.INFO: ==11719== Releasing lock... [2025-03-03 17:45:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:45:26] Production.INFO: 68 MB #Memory Used# [2025-03-03 17:46:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:46:06 [end_date_ymd] => 2025-03-03 17:46:06 [RateCDR] => 1 ) [2025-03-03 17: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-03 14:46:06' and `end` < '2025-03-03 17: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-03 17:46:18] Production.INFO: count ==5275 [2025-03-03 17:46:21] Production.ERROR: pbx CDR StartTime 2025-03-03 14:46:06 - End Time 2025-03-03 17:46:06 [2025-03-03 17:46:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:46:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600079', 'tblTempUsageDetail_20' ) start [2025-03-03 17:46:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600079', 'tblTempUsageDetail_20' ) end [2025-03-03 17:46:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600079', 'tblTempVendorCDR_20' ) start [2025-03-03 17:46:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600079', 'tblTempVendorCDR_20' ) end [2025-03-03 17:46:21] Production.INFO: ProcessCDR(1,14600079,1,1,2) [2025-03-03 17:46:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600079,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:46:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600079,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:46:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600079,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:46:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600079,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:46:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600079', 'tblTempUsageDetail_20' ) start [2025-03-03 17:46:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600079', 'tblTempUsageDetail_20' ) end [2025-03-03 17:46:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:46:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:46:24] Production.INFO: ==11793== Releasing lock... [2025-03-03 17:46:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:46:24] Production.INFO: 67.5 MB #Memory Used# [2025-03-03 17:47:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:47:06 [end_date_ymd] => 2025-03-03 17:47:06 [RateCDR] => 1 ) [2025-03-03 17:47:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 14:47:06' and `end` < '2025-03-03 17:47:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 17:47:19] Production.INFO: count ==5213 [2025-03-03 17:47:21] Production.ERROR: pbx CDR StartTime 2025-03-03 14:47:06 - End Time 2025-03-03 17:47:06 [2025-03-03 17:47:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:47:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600084', 'tblTempUsageDetail_20' ) start [2025-03-03 17:47:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600084', 'tblTempUsageDetail_20' ) end [2025-03-03 17:47:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600084', 'tblTempVendorCDR_20' ) start [2025-03-03 17:47:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600084', 'tblTempVendorCDR_20' ) end [2025-03-03 17:47:21] Production.INFO: ProcessCDR(1,14600084,1,1,2) [2025-03-03 17:47:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600084,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:47:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600084,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:47:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600084,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:47:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600084,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:47:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600084', 'tblTempUsageDetail_20' ) start [2025-03-03 17:47:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600084', 'tblTempUsageDetail_20' ) end [2025-03-03 17:47:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:47:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:47:26] Production.INFO: ==11881== Releasing lock... [2025-03-03 17:47:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:47:26] Production.INFO: 67 MB #Memory Used# [2025-03-03 17:48:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:48:06 [end_date_ymd] => 2025-03-03 17:48:06 [RateCDR] => 1 ) [2025-03-03 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-03 14:48:06' and `end` < '2025-03-03 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-03 17:48:19] Production.INFO: count ==5168 [2025-03-03 17:48:21] Production.ERROR: pbx CDR StartTime 2025-03-03 14:48:06 - End Time 2025-03-03 17:48:06 [2025-03-03 17:48:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:48:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600089', 'tblTempUsageDetail_20' ) start [2025-03-03 17:48:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600089', 'tblTempUsageDetail_20' ) end [2025-03-03 17:48:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600089', 'tblTempVendorCDR_20' ) start [2025-03-03 17:48:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600089', 'tblTempVendorCDR_20' ) end [2025-03-03 17:48:21] Production.INFO: ProcessCDR(1,14600089,1,1,2) [2025-03-03 17:48:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600089,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:48:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600089,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:48:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600089,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:48:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600089,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:48:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600089', 'tblTempUsageDetail_20' ) start [2025-03-03 17:48:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600089', 'tblTempUsageDetail_20' ) end [2025-03-03 17:48:25] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:48:25] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:48:25] Production.INFO: ==11978== Releasing lock... [2025-03-03 17:48:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:48:25] Production.INFO: 66.75 MB #Memory Used# [2025-03-03 17:49:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:49:06 [end_date_ymd] => 2025-03-03 17:49:06 [RateCDR] => 1 ) [2025-03-03 17: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-03 14:49:06' and `end` < '2025-03-03 17: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-03 17:49:19] Production.INFO: count ==5129 [2025-03-03 17:49:22] Production.ERROR: pbx CDR StartTime 2025-03-03 14:49:06 - End Time 2025-03-03 17:49:06 [2025-03-03 17:49:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:49:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600094', 'tblTempUsageDetail_20' ) start [2025-03-03 17:49:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600094', 'tblTempUsageDetail_20' ) end [2025-03-03 17:49:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600094', 'tblTempVendorCDR_20' ) start [2025-03-03 17:49:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600094', 'tblTempVendorCDR_20' ) end [2025-03-03 17:49:22] Production.INFO: ProcessCDR(1,14600094,1,1,2) [2025-03-03 17:49:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600094,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:49:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600094,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:49:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600094,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:49:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600094,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:49:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600094', 'tblTempUsageDetail_20' ) start [2025-03-03 17:49:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600094', 'tblTempUsageDetail_20' ) end [2025-03-03 17:49:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:49:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:49:27] Production.INFO: ==12078== Releasing lock... [2025-03-03 17:49:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:49:27] Production.INFO: 66.5 MB #Memory Used# [2025-03-03 17:50:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:50:06 [end_date_ymd] => 2025-03-03 17:50:06 [RateCDR] => 1 ) [2025-03-03 17:50:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 14:50:06' and `end` < '2025-03-03 17:50:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 17:50:19] Production.INFO: count ==5092 [2025-03-03 17:50:22] Production.ERROR: pbx CDR StartTime 2025-03-03 14:50:06 - End Time 2025-03-03 17:50:06 [2025-03-03 17:50:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:50:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600100', 'tblTempUsageDetail_20' ) start [2025-03-03 17:50:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600100', 'tblTempUsageDetail_20' ) end [2025-03-03 17:50:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600100', 'tblTempVendorCDR_20' ) start [2025-03-03 17:50:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600100', 'tblTempVendorCDR_20' ) end [2025-03-03 17:50:22] Production.INFO: ProcessCDR(1,14600100,1,1,2) [2025-03-03 17:50:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600100,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:50:25] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600100,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:50:25] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600100,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:50:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600100,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:50:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600100', 'tblTempUsageDetail_20' ) start [2025-03-03 17:50:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600100', 'tblTempUsageDetail_20' ) end [2025-03-03 17:50:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:50:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:50:27] Production.INFO: ==12191== Releasing lock... [2025-03-03 17:50:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:50:27] Production.INFO: 66.25 MB #Memory Used# [2025-03-03 17:51:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:51:06 [end_date_ymd] => 2025-03-03 17:51:06 [RateCDR] => 1 ) [2025-03-03 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-03 14:51:06' and `end` < '2025-03-03 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-03 17:51:19] Production.INFO: count ==5016 [2025-03-03 17:51:21] Production.ERROR: pbx CDR StartTime 2025-03-03 14:51:06 - End Time 2025-03-03 17:51:06 [2025-03-03 17:51:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:51:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600105', 'tblTempUsageDetail_20' ) start [2025-03-03 17:51:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600105', 'tblTempUsageDetail_20' ) end [2025-03-03 17:51:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600105', 'tblTempVendorCDR_20' ) start [2025-03-03 17:51:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600105', 'tblTempVendorCDR_20' ) end [2025-03-03 17:51:21] Production.INFO: ProcessCDR(1,14600105,1,1,2) [2025-03-03 17:51:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600105,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:51:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600105,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:51:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600105,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:51:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600105,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:51:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600105', 'tblTempUsageDetail_20' ) start [2025-03-03 17:51:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600105', 'tblTempUsageDetail_20' ) end [2025-03-03 17:51:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:51:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:51:26] Production.INFO: ==12303== Releasing lock... [2025-03-03 17:51:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:51:26] Production.INFO: 65.5 MB #Memory Used# [2025-03-03 17:52:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:52:05 [end_date_ymd] => 2025-03-03 17:52:05 [RateCDR] => 1 ) [2025-03-03 17:52:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 14:52:05' and `end` < '2025-03-03 17:52:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 17:52:18] Production.INFO: count ==4985 [2025-03-03 17:52:20] Production.ERROR: pbx CDR StartTime 2025-03-03 14:52:05 - End Time 2025-03-03 17:52:05 [2025-03-03 17:52:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:52:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600110', 'tblTempUsageDetail_20' ) start [2025-03-03 17:52:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600110', 'tblTempUsageDetail_20' ) end [2025-03-03 17:52:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600110', 'tblTempVendorCDR_20' ) start [2025-03-03 17:52:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600110', 'tblTempVendorCDR_20' ) end [2025-03-03 17:52:21] Production.INFO: ProcessCDR(1,14600110,1,1,2) [2025-03-03 17:52:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600110,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:52:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600110,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:52:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600110,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:52:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600110,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:52:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600110', 'tblTempUsageDetail_20' ) start [2025-03-03 17:52:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600110', 'tblTempUsageDetail_20' ) end [2025-03-03 17:52:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:52:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:52:24] Production.INFO: ==12446== Releasing lock... [2025-03-03 17:52:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:52:24] Production.INFO: 65.25 MB #Memory Used# [2025-03-03 17:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:53:05 [end_date_ymd] => 2025-03-03 17:53:05 [RateCDR] => 1 ) [2025-03-03 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-03 14:53:05' and `end` < '2025-03-03 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-03 17:53:18] Production.INFO: count ==4952 [2025-03-03 17:53:20] Production.ERROR: pbx CDR StartTime 2025-03-03 14:53:05 - End Time 2025-03-03 17:53:05 [2025-03-03 17:53:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:53:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600115', 'tblTempUsageDetail_20' ) start [2025-03-03 17:53:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600115', 'tblTempUsageDetail_20' ) end [2025-03-03 17:53:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600115', 'tblTempVendorCDR_20' ) start [2025-03-03 17:53:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600115', 'tblTempVendorCDR_20' ) end [2025-03-03 17:53:20] Production.INFO: ProcessCDR(1,14600115,1,1,2) [2025-03-03 17:53:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600115,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:53:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600115,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:53:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600115,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:53:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600115,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:53:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600115', 'tblTempUsageDetail_20' ) start [2025-03-03 17:53:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600115', 'tblTempUsageDetail_20' ) end [2025-03-03 17:53:25] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:53:25] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:53:25] Production.INFO: ==12550== Releasing lock... [2025-03-03 17:53:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:53:25] Production.INFO: 65 MB #Memory Used# [2025-03-03 17:54:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:54:05 [end_date_ymd] => 2025-03-03 17:54:05 [RateCDR] => 1 ) [2025-03-03 17: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-03 14:54:05' and `end` < '2025-03-03 17: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-03 17:54:18] Production.INFO: count ==4925 [2025-03-03 17:54:20] Production.ERROR: pbx CDR StartTime 2025-03-03 14:54:05 - End Time 2025-03-03 17:54:05 [2025-03-03 17:54:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:54:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600120', 'tblTempUsageDetail_20' ) start [2025-03-03 17:54:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600120', 'tblTempUsageDetail_20' ) end [2025-03-03 17:54:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600120', 'tblTempVendorCDR_20' ) start [2025-03-03 17:54:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600120', 'tblTempVendorCDR_20' ) end [2025-03-03 17:54:21] Production.INFO: ProcessCDR(1,14600120,1,1,2) [2025-03-03 17:54:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600120,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:54:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600120,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:54:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600120,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:54:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600120,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:54:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600120', 'tblTempUsageDetail_20' ) start [2025-03-03 17:54:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600120', 'tblTempUsageDetail_20' ) end [2025-03-03 17:54:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:54:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:54:24] Production.INFO: ==12649== Releasing lock... [2025-03-03 17:54:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:54:24] Production.INFO: 65 MB #Memory Used# [2025-03-03 17:55:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:55:05 [end_date_ymd] => 2025-03-03 17:55:05 [RateCDR] => 1 ) [2025-03-03 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-03 14:55:05' and `end` < '2025-03-03 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-03 17:55:18] Production.INFO: count ==4874 [2025-03-03 17:55:20] Production.ERROR: pbx CDR StartTime 2025-03-03 14:55:05 - End Time 2025-03-03 17:55:05 [2025-03-03 17:55:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:55:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600125', 'tblTempUsageDetail_20' ) start [2025-03-03 17:55:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600125', 'tblTempUsageDetail_20' ) end [2025-03-03 17:55:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600125', 'tblTempVendorCDR_20' ) start [2025-03-03 17:55:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600125', 'tblTempVendorCDR_20' ) end [2025-03-03 17:55:21] Production.INFO: ProcessCDR(1,14600125,1,1,2) [2025-03-03 17:55:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600125,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:55:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600125,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:55:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600125,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:55:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600125,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:55:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600125', 'tblTempUsageDetail_20' ) start [2025-03-03 17:55:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600125', 'tblTempUsageDetail_20' ) end [2025-03-03 17:55:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:55:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:55:26] Production.INFO: ==12750== Releasing lock... [2025-03-03 17:55:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:55:26] Production.INFO: 64.5 MB #Memory Used# [2025-03-03 17:56:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:56:05 [end_date_ymd] => 2025-03-03 17:56:05 [RateCDR] => 1 ) [2025-03-03 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-03 14:56:05' and `end` < '2025-03-03 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-03 17:56:18] Production.INFO: count ==4840 [2025-03-03 17:56:20] Production.ERROR: pbx CDR StartTime 2025-03-03 14:56:05 - End Time 2025-03-03 17:56:05 [2025-03-03 17:56:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:56:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600130', 'tblTempUsageDetail_20' ) start [2025-03-03 17:56:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600130', 'tblTempUsageDetail_20' ) end [2025-03-03 17:56:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600130', 'tblTempVendorCDR_20' ) start [2025-03-03 17:56:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600130', 'tblTempVendorCDR_20' ) end [2025-03-03 17:56:20] Production.INFO: ProcessCDR(1,14600130,1,1,2) [2025-03-03 17:56:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600130,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:56:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600130,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:56:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600130,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:56:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600130,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:56:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600130', 'tblTempUsageDetail_20' ) start [2025-03-03 17:56:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600130', 'tblTempUsageDetail_20' ) end [2025-03-03 17:56:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:56:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:56:24] Production.INFO: ==12853== Releasing lock... [2025-03-03 17:56:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:56:24] Production.INFO: 64.25 MB #Memory Used# [2025-03-03 17:57:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:57:05 [end_date_ymd] => 2025-03-03 17:57:05 [RateCDR] => 1 ) [2025-03-03 17:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 14:57:05' and `end` < '2025-03-03 17:57:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 17:57:18] Production.INFO: count ==4807 [2025-03-03 17:57:21] Production.ERROR: pbx CDR StartTime 2025-03-03 14:57:05 - End Time 2025-03-03 17:57:05 [2025-03-03 17:57:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:57:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600135', 'tblTempUsageDetail_20' ) start [2025-03-03 17:57:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600135', 'tblTempUsageDetail_20' ) end [2025-03-03 17:57:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600135', 'tblTempVendorCDR_20' ) start [2025-03-03 17:57:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600135', 'tblTempVendorCDR_20' ) end [2025-03-03 17:57:21] Production.INFO: ProcessCDR(1,14600135,1,1,2) [2025-03-03 17:57:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600135,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:57:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600135,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:57:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600135,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:57:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600135,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:57:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600135', 'tblTempUsageDetail_20' ) start [2025-03-03 17:57:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600135', 'tblTempUsageDetail_20' ) end [2025-03-03 17:57:25] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:57:25] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:57:26] Production.INFO: ==12957== Releasing lock... [2025-03-03 17:57:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:57:26] Production.INFO: 64 MB #Memory Used# [2025-03-03 17:58:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:58:05 [end_date_ymd] => 2025-03-03 17:58:05 [RateCDR] => 1 ) [2025-03-03 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-03 14:58:05' and `end` < '2025-03-03 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-03 17:58:18] Production.INFO: count ==4784 [2025-03-03 17:58:20] Production.ERROR: pbx CDR StartTime 2025-03-03 14:58:05 - End Time 2025-03-03 17:58:05 [2025-03-03 17:58:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:58:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600140', 'tblTempUsageDetail_20' ) start [2025-03-03 17:58:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600140', 'tblTempUsageDetail_20' ) end [2025-03-03 17:58:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600140', 'tblTempVendorCDR_20' ) start [2025-03-03 17:58:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600140', 'tblTempVendorCDR_20' ) end [2025-03-03 17:58:20] Production.INFO: ProcessCDR(1,14600140,1,1,2) [2025-03-03 17:58:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600140,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:58:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600140,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:58:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600140,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:58:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600140,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:58:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600140', 'tblTempUsageDetail_20' ) start [2025-03-03 17:58:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600140', 'tblTempUsageDetail_20' ) end [2025-03-03 17:58:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:58:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:58:24] Production.INFO: ==13063== Releasing lock... [2025-03-03 17:58:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:58:24] Production.INFO: 63.75 MB #Memory Used# [2025-03-03 17:59:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 14:59:06 [end_date_ymd] => 2025-03-03 17:59:06 [RateCDR] => 1 ) [2025-03-03 17: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-03 14:59:06' and `end` < '2025-03-03 17: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-03 17:59:19] Production.INFO: count ==4782 [2025-03-03 17:59:21] Production.ERROR: pbx CDR StartTime 2025-03-03 14:59:06 - End Time 2025-03-03 17:59:06 [2025-03-03 17:59:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 17:59:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600145', 'tblTempUsageDetail_20' ) start [2025-03-03 17:59:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600145', 'tblTempUsageDetail_20' ) end [2025-03-03 17:59:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600145', 'tblTempVendorCDR_20' ) start [2025-03-03 17:59:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600145', 'tblTempVendorCDR_20' ) end [2025-03-03 17:59:21] Production.INFO: ProcessCDR(1,14600145,1,1,2) [2025-03-03 17:59:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600145,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:59:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600145,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 17:59:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600145,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:59:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600145,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 17:59:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600145', 'tblTempUsageDetail_20' ) start [2025-03-03 17:59:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600145', 'tblTempUsageDetail_20' ) end [2025-03-03 17:59:25] Production.ERROR: pbx prc_insertCDR start [2025-03-03 17:59:25] Production.ERROR: pbx prc_insertCDR end [2025-03-03 17:59:25] Production.INFO: ==13167== Releasing lock... [2025-03-03 17:59:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 17:59:25] Production.INFO: 63.75 MB #Memory Used# [2025-03-03 18:00:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:00:06 [end_date_ymd] => 2025-03-03 18:00:06 [RateCDR] => 1 ) [2025-03-03 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-03 15:00:06' and `end` < '2025-03-03 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-03 18:00:19] Production.INFO: count ==4750 [2025-03-03 18:00:21] Production.ERROR: pbx CDR StartTime 2025-03-03 15:00:06 - End Time 2025-03-03 18:00:06 [2025-03-03 18:00:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:00:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600151', 'tblTempUsageDetail_20' ) start [2025-03-03 18:00:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600151', 'tblTempUsageDetail_20' ) end [2025-03-03 18:00:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600151', 'tblTempVendorCDR_20' ) start [2025-03-03 18:00:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600151', 'tblTempVendorCDR_20' ) end [2025-03-03 18:00:21] Production.INFO: ProcessCDR(1,14600151,1,1,2) [2025-03-03 18:00:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600151,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:00:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600151,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:00:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600151,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:00:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600151,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:00:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600151', 'tblTempUsageDetail_20' ) start [2025-03-03 18:00:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600151', 'tblTempUsageDetail_20' ) end [2025-03-03 18:00:27] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:00:27] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:00:27] Production.INFO: ==13269== Releasing lock... [2025-03-03 18:00:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:00:27] Production.INFO: 63.5 MB #Memory Used# [2025-03-03 18:01:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:01:06 [end_date_ymd] => 2025-03-03 18:01:06 [RateCDR] => 1 ) [2025-03-03 18:01:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 15:01:06' and `end` < '2025-03-03 18:01:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 18:01:19] Production.INFO: count ==4674 [2025-03-03 18:01:21] Production.ERROR: pbx CDR StartTime 2025-03-03 15:01:06 - End Time 2025-03-03 18:01:06 [2025-03-03 18:01:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:01:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600156', 'tblTempUsageDetail_20' ) start [2025-03-03 18:01:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600156', 'tblTempUsageDetail_20' ) end [2025-03-03 18:01:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600156', 'tblTempVendorCDR_20' ) start [2025-03-03 18:01:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600156', 'tblTempVendorCDR_20' ) end [2025-03-03 18:01:21] Production.INFO: ProcessCDR(1,14600156,1,1,2) [2025-03-03 18:01:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600156,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:01:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600156,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:01:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600156,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:01:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600156,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:01:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600156', 'tblTempUsageDetail_20' ) start [2025-03-03 18:01:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600156', 'tblTempUsageDetail_20' ) end [2025-03-03 18:01:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:01:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:01:26] Production.INFO: ==13382== Releasing lock... [2025-03-03 18:01:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:01:26] Production.INFO: 63 MB #Memory Used# [2025-03-03 18:02:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:02:05 [end_date_ymd] => 2025-03-03 18:02:05 [RateCDR] => 1 ) [2025-03-03 18:02:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 15:02:05' and `end` < '2025-03-03 18:02:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 18:02:18] Production.INFO: count ==4660 [2025-03-03 18:02:22] Production.ERROR: pbx CDR StartTime 2025-03-03 15:02:05 - End Time 2025-03-03 18:02:05 [2025-03-03 18:02:22] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:02:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600161', 'tblTempUsageDetail_20' ) start [2025-03-03 18:02:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600161', 'tblTempUsageDetail_20' ) end [2025-03-03 18:02:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600161', 'tblTempVendorCDR_20' ) start [2025-03-03 18:02:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600161', 'tblTempVendorCDR_20' ) end [2025-03-03 18:02:22] Production.INFO: ProcessCDR(1,14600161,1,1,2) [2025-03-03 18:02:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600161,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:02:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600161,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:02:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600161,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:02:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600161,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:02:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600161', 'tblTempUsageDetail_20' ) start [2025-03-03 18:02:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600161', 'tblTempUsageDetail_20' ) end [2025-03-03 18:02:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:02:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:02:26] Production.INFO: ==13481== Releasing lock... [2025-03-03 18:02:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:02:26] Production.INFO: 63 MB #Memory Used# [2025-03-03 18:03:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:03:05 [end_date_ymd] => 2025-03-03 18:03:05 [RateCDR] => 1 ) [2025-03-03 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-03 15:03:05' and `end` < '2025-03-03 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-03 18:03:18] Production.INFO: count ==4643 [2025-03-03 18:03:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:03:05 - End Time 2025-03-03 18:03:05 [2025-03-03 18:03:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:03:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600166', 'tblTempUsageDetail_20' ) start [2025-03-03 18:03:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600166', 'tblTempUsageDetail_20' ) end [2025-03-03 18:03:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600166', 'tblTempVendorCDR_20' ) start [2025-03-03 18:03:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600166', 'tblTempVendorCDR_20' ) end [2025-03-03 18:03:20] Production.INFO: ProcessCDR(1,14600166,1,1,2) [2025-03-03 18:03:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600166,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:03:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600166,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:03:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600166,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:03:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600166,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:03:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600166', 'tblTempUsageDetail_20' ) start [2025-03-03 18:03:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600166', 'tblTempUsageDetail_20' ) end [2025-03-03 18:03:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:03:25] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:03:25] Production.INFO: ==13582== Releasing lock... [2025-03-03 18:03:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:03:25] Production.INFO: 62.75 MB #Memory Used# [2025-03-03 18:04:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:04:05 [end_date_ymd] => 2025-03-03 18:04:05 [RateCDR] => 1 ) [2025-03-03 18:04:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 15:04:05' and `end` < '2025-03-03 18:04:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 18:04:18] Production.INFO: count ==4638 [2025-03-03 18:04:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:04:05 - End Time 2025-03-03 18:04:05 [2025-03-03 18:04:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:04:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600171', 'tblTempUsageDetail_20' ) start [2025-03-03 18:04:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600171', 'tblTempUsageDetail_20' ) end [2025-03-03 18:04:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600171', 'tblTempVendorCDR_20' ) start [2025-03-03 18:04:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600171', 'tblTempVendorCDR_20' ) end [2025-03-03 18:04:21] Production.INFO: ProcessCDR(1,14600171,1,1,2) [2025-03-03 18:04:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600171,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:04:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600171,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:04:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600171,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:04:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600171,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:04:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600171', 'tblTempUsageDetail_20' ) start [2025-03-03 18:04:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600171', 'tblTempUsageDetail_20' ) end [2025-03-03 18:04:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:04:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:04:26] Production.INFO: ==13690== Releasing lock... [2025-03-03 18:04:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:04:26] Production.INFO: 62.75 MB #Memory Used# [2025-03-03 18:05:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:05:05 [end_date_ymd] => 2025-03-03 18:05:05 [RateCDR] => 1 ) [2025-03-03 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-03 15:05:05' and `end` < '2025-03-03 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-03 18:05:18] Production.INFO: count ==4615 [2025-03-03 18:05:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:05:05 - End Time 2025-03-03 18:05:05 [2025-03-03 18:05:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:05:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600176', 'tblTempUsageDetail_20' ) start [2025-03-03 18:05:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600176', 'tblTempUsageDetail_20' ) end [2025-03-03 18:05:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600176', 'tblTempVendorCDR_20' ) start [2025-03-03 18:05:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600176', 'tblTempVendorCDR_20' ) end [2025-03-03 18:05:20] Production.INFO: ProcessCDR(1,14600176,1,1,2) [2025-03-03 18:05:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600176,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:05:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600176,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:05:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600176,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:05:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600176,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:05:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600176', 'tblTempUsageDetail_20' ) start [2025-03-03 18:05:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600176', 'tblTempUsageDetail_20' ) end [2025-03-03 18:05:25] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:05:25] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:05:25] Production.INFO: ==13791== Releasing lock... [2025-03-03 18:05:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:05:25] Production.INFO: 62.5 MB #Memory Used# [2025-03-03 18:06:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:06:06 [end_date_ymd] => 2025-03-03 18:06:06 [RateCDR] => 1 ) [2025-03-03 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-03 15:06:06' and `end` < '2025-03-03 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-03 18:06:19] Production.INFO: count ==4603 [2025-03-03 18:06:21] Production.ERROR: pbx CDR StartTime 2025-03-03 15:06:06 - End Time 2025-03-03 18:06:06 [2025-03-03 18:06:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:06:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600181', 'tblTempUsageDetail_20' ) start [2025-03-03 18:06:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600181', 'tblTempUsageDetail_20' ) end [2025-03-03 18:06:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600181', 'tblTempVendorCDR_20' ) start [2025-03-03 18:06:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600181', 'tblTempVendorCDR_20' ) end [2025-03-03 18:06:21] Production.INFO: ProcessCDR(1,14600181,1,1,2) [2025-03-03 18:06:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600181,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:06:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600181,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:06:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600181,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:06:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600181,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:06:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600181', 'tblTempUsageDetail_20' ) start [2025-03-03 18:06:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600181', 'tblTempUsageDetail_20' ) end [2025-03-03 18:06:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:06:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:06:24] Production.INFO: ==13894== Releasing lock... [2025-03-03 18:06:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:06:24] Production.INFO: 62.5 MB #Memory Used# [2025-03-03 18:07:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:07:05 [end_date_ymd] => 2025-03-03 18:07:05 [RateCDR] => 1 ) [2025-03-03 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-03 15:07:05' and `end` < '2025-03-03 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-03 18:07:18] Production.INFO: count ==4601 [2025-03-03 18:07:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:07:05 - End Time 2025-03-03 18:07:05 [2025-03-03 18:07:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:07:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600186', 'tblTempUsageDetail_20' ) start [2025-03-03 18:07:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600186', 'tblTempUsageDetail_20' ) end [2025-03-03 18:07:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600186', 'tblTempVendorCDR_20' ) start [2025-03-03 18:07:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600186', 'tblTempVendorCDR_20' ) end [2025-03-03 18:07:20] Production.INFO: ProcessCDR(1,14600186,1,1,2) [2025-03-03 18:07:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600186,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:07:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600186,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:07:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600186,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:07:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600186,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:07:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600186', 'tblTempUsageDetail_20' ) start [2025-03-03 18:07:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600186', 'tblTempUsageDetail_20' ) end [2025-03-03 18:07:25] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:07:25] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:07:25] Production.INFO: ==14033== Releasing lock... [2025-03-03 18:07:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:07:25] Production.INFO: 62.5 MB #Memory Used# [2025-03-03 18:08:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:08:05 [end_date_ymd] => 2025-03-03 18:08:05 [RateCDR] => 1 ) [2025-03-03 18:08:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 15:08:05' and `end` < '2025-03-03 18:08:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 18:08:18] Production.INFO: count ==4587 [2025-03-03 18:08:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:08:05 - End Time 2025-03-03 18:08:05 [2025-03-03 18:08:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:08:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600191', 'tblTempUsageDetail_20' ) start [2025-03-03 18:08:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600191', 'tblTempUsageDetail_20' ) end [2025-03-03 18:08:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600191', 'tblTempVendorCDR_20' ) start [2025-03-03 18:08:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600191', 'tblTempVendorCDR_20' ) end [2025-03-03 18:08:20] Production.INFO: ProcessCDR(1,14600191,1,1,2) [2025-03-03 18:08:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600191,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:08:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600191,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:08:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600191,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:08:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600191,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:08:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600191', 'tblTempUsageDetail_20' ) start [2025-03-03 18:08:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600191', 'tblTempUsageDetail_20' ) end [2025-03-03 18:08:25] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:08:25] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:08:25] Production.INFO: ==14136== Releasing lock... [2025-03-03 18:08:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:08:25] Production.INFO: 62.25 MB #Memory Used# [2025-03-03 18:09:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:09:06 [end_date_ymd] => 2025-03-03 18:09:06 [RateCDR] => 1 ) [2025-03-03 18: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-03 15:09:06' and `end` < '2025-03-03 18: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-03 18:09:19] Production.INFO: count ==4565 [2025-03-03 18:09:21] Production.ERROR: pbx CDR StartTime 2025-03-03 15:09:06 - End Time 2025-03-03 18:09:06 [2025-03-03 18:09:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:09:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600196', 'tblTempUsageDetail_20' ) start [2025-03-03 18:09:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600196', 'tblTempUsageDetail_20' ) end [2025-03-03 18:09:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600196', 'tblTempVendorCDR_20' ) start [2025-03-03 18:09:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600196', 'tblTempVendorCDR_20' ) end [2025-03-03 18:09:21] Production.INFO: ProcessCDR(1,14600196,1,1,2) [2025-03-03 18:09:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600196,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:09:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600196,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:09:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600196,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:09:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600196,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:09:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600196', 'tblTempUsageDetail_20' ) start [2025-03-03 18:09:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600196', 'tblTempUsageDetail_20' ) end [2025-03-03 18:09:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:09:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:09:24] Production.INFO: ==14241== Releasing lock... [2025-03-03 18:09:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:09:24] Production.INFO: 62.25 MB #Memory Used# [2025-03-03 18:10:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:10:05 [end_date_ymd] => 2025-03-03 18:10:05 [RateCDR] => 1 ) [2025-03-03 18:10:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 15:10:05' and `end` < '2025-03-03 18:10:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 18:10:18] Production.INFO: count ==4526 [2025-03-03 18:10:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:10:05 - End Time 2025-03-03 18:10:05 [2025-03-03 18:10:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:10:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600202', 'tblTempUsageDetail_20' ) start [2025-03-03 18:10:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600202', 'tblTempUsageDetail_20' ) end [2025-03-03 18:10:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600202', 'tblTempVendorCDR_20' ) start [2025-03-03 18:10:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600202', 'tblTempVendorCDR_20' ) end [2025-03-03 18:10:20] Production.INFO: ProcessCDR(1,14600202,1,1,2) [2025-03-03 18:10:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600202,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:10:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600202,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:10:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600202,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:10:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600202,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:10:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600202', 'tblTempUsageDetail_20' ) start [2025-03-03 18:10:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600202', 'tblTempUsageDetail_20' ) end [2025-03-03 18:10:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:10:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:10:24] Production.INFO: ==14341== Releasing lock... [2025-03-03 18:10:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:10:24] Production.INFO: 62 MB #Memory Used# [2025-03-03 18:11:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:11:06 [end_date_ymd] => 2025-03-03 18:11:06 [RateCDR] => 1 ) [2025-03-03 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-03 15:11:06' and `end` < '2025-03-03 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-03 18:11:18] Production.INFO: count ==4480 [2025-03-03 18:11:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:11:06 - End Time 2025-03-03 18:11:06 [2025-03-03 18:11:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:11:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600207', 'tblTempUsageDetail_20' ) start [2025-03-03 18:11:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600207', 'tblTempUsageDetail_20' ) end [2025-03-03 18:11:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600207', 'tblTempVendorCDR_20' ) start [2025-03-03 18:11:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600207', 'tblTempVendorCDR_20' ) end [2025-03-03 18:11:21] Production.INFO: ProcessCDR(1,14600207,1,1,2) [2025-03-03 18:11:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600207,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:11:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600207,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:11:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600207,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:11:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600207,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:11:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600207', 'tblTempUsageDetail_20' ) start [2025-03-03 18:11:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600207', 'tblTempUsageDetail_20' ) end [2025-03-03 18:11:25] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:11:25] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:11:25] Production.INFO: ==14446== Releasing lock... [2025-03-03 18:11:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:11:25] Production.INFO: 61.75 MB #Memory Used# [2025-03-03 18:12:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:12:05 [end_date_ymd] => 2025-03-03 18:12:05 [RateCDR] => 1 ) [2025-03-03 18:12:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 15:12:05' and `end` < '2025-03-03 18:12:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 18:12:18] Production.INFO: count ==4443 [2025-03-03 18:12:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:12:05 - End Time 2025-03-03 18:12:05 [2025-03-03 18:12:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:12:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600212', 'tblTempUsageDetail_20' ) start [2025-03-03 18:12:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600212', 'tblTempUsageDetail_20' ) end [2025-03-03 18:12:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600212', 'tblTempVendorCDR_20' ) start [2025-03-03 18:12:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600212', 'tblTempVendorCDR_20' ) end [2025-03-03 18:12:20] Production.INFO: ProcessCDR(1,14600212,1,1,2) [2025-03-03 18:12:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600212,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:12:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600212,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:12:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600212,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:12:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600212,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:12:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600212', 'tblTempUsageDetail_20' ) start [2025-03-03 18:12:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600212', 'tblTempUsageDetail_20' ) end [2025-03-03 18:12:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:12:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:12:24] Production.INFO: ==14545== Releasing lock... [2025-03-03 18:12:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:12:24] Production.INFO: 61.25 MB #Memory Used# [2025-03-03 18:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:13:05 [end_date_ymd] => 2025-03-03 18:13:05 [RateCDR] => 1 ) [2025-03-03 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-03 15:13:05' and `end` < '2025-03-03 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-03 18:13:18] Production.INFO: count ==4401 [2025-03-03 18:13:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:13:05 - End Time 2025-03-03 18:13:05 [2025-03-03 18:13:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:13:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600217', 'tblTempUsageDetail_20' ) start [2025-03-03 18:13:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600217', 'tblTempUsageDetail_20' ) end [2025-03-03 18:13:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600217', 'tblTempVendorCDR_20' ) start [2025-03-03 18:13:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600217', 'tblTempVendorCDR_20' ) end [2025-03-03 18:13:20] Production.INFO: ProcessCDR(1,14600217,1,1,2) [2025-03-03 18:13:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600217,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:13:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600217,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:13:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600217,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:13:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600217,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:13:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600217', 'tblTempUsageDetail_20' ) start [2025-03-03 18:13:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600217', 'tblTempUsageDetail_20' ) end [2025-03-03 18:13:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:13:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:13:24] Production.INFO: ==14645== Releasing lock... [2025-03-03 18:13:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:13:24] Production.INFO: 61 MB #Memory Used# [2025-03-03 18:14:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:14:06 [end_date_ymd] => 2025-03-03 18:14:06 [RateCDR] => 1 ) [2025-03-03 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-03 15:14:06' and `end` < '2025-03-03 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-03 18:14:19] Production.INFO: count ==4389 [2025-03-03 18:14:21] Production.ERROR: pbx CDR StartTime 2025-03-03 15:14:06 - End Time 2025-03-03 18:14:06 [2025-03-03 18:14:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:14:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600222', 'tblTempUsageDetail_20' ) start [2025-03-03 18:14:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600222', 'tblTempUsageDetail_20' ) end [2025-03-03 18:14:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600222', 'tblTempVendorCDR_20' ) start [2025-03-03 18:14:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600222', 'tblTempVendorCDR_20' ) end [2025-03-03 18:14:21] Production.INFO: ProcessCDR(1,14600222,1,1,2) [2025-03-03 18:14:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600222,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:14:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600222,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:14:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600222,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:14:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600222,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:14:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600222', 'tblTempUsageDetail_20' ) start [2025-03-03 18:14:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600222', 'tblTempUsageDetail_20' ) end [2025-03-03 18:14:25] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:14:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:14:26] Production.INFO: ==14748== Releasing lock... [2025-03-03 18:14:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:14:26] Production.INFO: 60.75 MB #Memory Used# [2025-03-03 18:15:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:15:05 [end_date_ymd] => 2025-03-03 18:15:05 [RateCDR] => 1 ) [2025-03-03 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-03 15:15:05' and `end` < '2025-03-03 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-03 18:15:18] Production.INFO: count ==4373 [2025-03-03 18:15:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:15:05 - End Time 2025-03-03 18:15:05 [2025-03-03 18:15:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:15:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600227', 'tblTempUsageDetail_20' ) start [2025-03-03 18:15:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600227', 'tblTempUsageDetail_20' ) end [2025-03-03 18:15:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600227', 'tblTempVendorCDR_20' ) start [2025-03-03 18:15:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600227', 'tblTempVendorCDR_20' ) end [2025-03-03 18:15:20] Production.INFO: ProcessCDR(1,14600227,1,1,2) [2025-03-03 18:15:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600227,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:15:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600227,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:15:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600227,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:15:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600227,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:15:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600227', 'tblTempUsageDetail_20' ) start [2025-03-03 18:15:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600227', 'tblTempUsageDetail_20' ) end [2025-03-03 18:15:25] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:15:25] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:15:25] Production.INFO: ==14847== Releasing lock... [2025-03-03 18:15:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:15:25] Production.INFO: 60.75 MB #Memory Used# [2025-03-03 18:16:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:16:07 [end_date_ymd] => 2025-03-03 18:16:07 [RateCDR] => 1 ) [2025-03-03 18:16: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-03 15:16:07' and `end` < '2025-03-03 18:16: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-03 18:16:19] Production.INFO: count ==4347 [2025-03-03 18:16:21] Production.ERROR: pbx CDR StartTime 2025-03-03 15:16:07 - End Time 2025-03-03 18:16:07 [2025-03-03 18:16:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:16:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600232', 'tblTempUsageDetail_20' ) start [2025-03-03 18:16:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600232', 'tblTempUsageDetail_20' ) end [2025-03-03 18:16:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600232', 'tblTempVendorCDR_20' ) start [2025-03-03 18:16:22] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600232', 'tblTempVendorCDR_20' ) end [2025-03-03 18:16:22] Production.INFO: ProcessCDR(1,14600232,1,1,2) [2025-03-03 18:16:22] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600232,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:16:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600232,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:16:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600232,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:16:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600232,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:16:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600232', 'tblTempUsageDetail_20' ) start [2025-03-03 18:16:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600232', 'tblTempUsageDetail_20' ) end [2025-03-03 18:16:25] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:16:25] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:16:25] Production.INFO: ==14948== Releasing lock... [2025-03-03 18:16:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:16:25] Production.INFO: 60.5 MB #Memory Used# [2025-03-03 18:17:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:17:05 [end_date_ymd] => 2025-03-03 18:17:05 [RateCDR] => 1 ) [2025-03-03 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-03 15:17:05' and `end` < '2025-03-03 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-03 18:17:18] Production.INFO: count ==4320 [2025-03-03 18:17:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:17:05 - End Time 2025-03-03 18:17:05 [2025-03-03 18:17:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:17:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600237', 'tblTempUsageDetail_20' ) start [2025-03-03 18:17:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600237', 'tblTempUsageDetail_20' ) end [2025-03-03 18:17:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600237', 'tblTempVendorCDR_20' ) start [2025-03-03 18:17:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600237', 'tblTempVendorCDR_20' ) end [2025-03-03 18:17:20] Production.INFO: ProcessCDR(1,14600237,1,1,2) [2025-03-03 18:17:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600237,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:17:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600237,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:17:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600237,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:17:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600237,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:17:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600237', 'tblTempUsageDetail_20' ) start [2025-03-03 18:17:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600237', 'tblTempUsageDetail_20' ) end [2025-03-03 18:17:25] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:17:25] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:17:25] Production.INFO: ==15053== Releasing lock... [2025-03-03 18:17:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:17:25] Production.INFO: 60.25 MB #Memory Used# [2025-03-03 18:18:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:18:05 [end_date_ymd] => 2025-03-03 18:18:05 [RateCDR] => 1 ) [2025-03-03 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-03 15:18:05' and `end` < '2025-03-03 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-03 18:18:18] Production.INFO: count ==4267 [2025-03-03 18:18:19] Production.ERROR: pbx CDR StartTime 2025-03-03 15:18:05 - End Time 2025-03-03 18:18:05 [2025-03-03 18:18:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:18:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600240', 'tblTempUsageDetail_20' ) start [2025-03-03 18:18:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600240', 'tblTempUsageDetail_20' ) end [2025-03-03 18:18:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600240', 'tblTempVendorCDR_20' ) start [2025-03-03 18:18:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600240', 'tblTempVendorCDR_20' ) end [2025-03-03 18:18:20] Production.INFO: ProcessCDR(1,14600240,1,1,2) [2025-03-03 18:18:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600240,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:18:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600240,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:18:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600240,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:18:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600240,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:18:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600240', 'tblTempUsageDetail_20' ) start [2025-03-03 18:18:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600240', 'tblTempUsageDetail_20' ) end [2025-03-03 18:18:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:18:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:18:24] Production.INFO: ==15156== Releasing lock... [2025-03-03 18:18:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:18:24] Production.INFO: 60 MB #Memory Used# [2025-03-03 18:19:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:19:06 [end_date_ymd] => 2025-03-03 18:19:06 [RateCDR] => 1 ) [2025-03-03 18: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-03 15:19:06' and `end` < '2025-03-03 18: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-03 18:19:19] Production.INFO: count ==4233 [2025-03-03 18:19:21] Production.ERROR: pbx CDR StartTime 2025-03-03 15:19:06 - End Time 2025-03-03 18:19:06 [2025-03-03 18:19:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:19:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600247', 'tblTempUsageDetail_20' ) start [2025-03-03 18:19:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600247', 'tblTempUsageDetail_20' ) end [2025-03-03 18:19:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600247', 'tblTempVendorCDR_20' ) start [2025-03-03 18:19:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600247', 'tblTempVendorCDR_20' ) end [2025-03-03 18:19:21] Production.INFO: ProcessCDR(1,14600247,1,1,2) [2025-03-03 18:19:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600247,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:19:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600247,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:19:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600247,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:19:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600247,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:19:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600247', 'tblTempUsageDetail_20' ) start [2025-03-03 18:19:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600247', 'tblTempUsageDetail_20' ) end [2025-03-03 18:19:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:19:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:19:26] Production.INFO: ==15266== Releasing lock... [2025-03-03 18:19:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:19:26] Production.INFO: 59.75 MB #Memory Used# [2025-03-03 18:20:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:20:07 [end_date_ymd] => 2025-03-03 18:20:07 [RateCDR] => 1 ) [2025-03-03 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-03 15:20:07' and `end` < '2025-03-03 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-03 18:20:20] Production.INFO: count ==4220 [2025-03-03 18:20:21] Production.ERROR: pbx CDR StartTime 2025-03-03 15:20:07 - End Time 2025-03-03 18:20:07 [2025-03-03 18:20:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:20:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600253', 'tblTempUsageDetail_20' ) start [2025-03-03 18:20:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600253', 'tblTempUsageDetail_20' ) end [2025-03-03 18:20:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600253', 'tblTempVendorCDR_20' ) start [2025-03-03 18:20:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600253', 'tblTempVendorCDR_20' ) end [2025-03-03 18:20:21] Production.INFO: ProcessCDR(1,14600253,1,1,2) [2025-03-03 18:20:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600253,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:20:24] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600253,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:20:24] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600253,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:20:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600253,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:20:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600253', 'tblTempUsageDetail_20' ) start [2025-03-03 18:20:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600253', 'tblTempUsageDetail_20' ) end [2025-03-03 18:20:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:20:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:20:26] Production.INFO: ==15369== Releasing lock... [2025-03-03 18:20:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:20:26] Production.INFO: 59.5 MB #Memory Used# [2025-03-03 18:21:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:21:05 [end_date_ymd] => 2025-03-03 18:21:05 [RateCDR] => 1 ) [2025-03-03 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-03 15:21:05' and `end` < '2025-03-03 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-03 18:21:18] Production.INFO: count ==4195 [2025-03-03 18:21:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:21:05 - End Time 2025-03-03 18:21:05 [2025-03-03 18:21:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:21:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600258', 'tblTempUsageDetail_20' ) start [2025-03-03 18:21:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600258', 'tblTempUsageDetail_20' ) end [2025-03-03 18:21:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600258', 'tblTempVendorCDR_20' ) start [2025-03-03 18:21:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600258', 'tblTempVendorCDR_20' ) end [2025-03-03 18:21:20] Production.INFO: ProcessCDR(1,14600258,1,1,2) [2025-03-03 18:21:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600258,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:21:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600258,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:21:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600258,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:21:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600258,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:21:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600258', 'tblTempUsageDetail_20' ) start [2025-03-03 18:21:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600258', 'tblTempUsageDetail_20' ) end [2025-03-03 18:21:25] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:21:25] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:21:25] Production.INFO: ==15466== Releasing lock... [2025-03-03 18:21:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:21:25] Production.INFO: 59.5 MB #Memory Used# [2025-03-03 18:22:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:22:05 [end_date_ymd] => 2025-03-03 18:22:05 [RateCDR] => 1 ) [2025-03-03 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-03 15:22:05' and `end` < '2025-03-03 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-03 18:22:18] Production.INFO: count ==4156 [2025-03-03 18:22:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:22:05 - End Time 2025-03-03 18:22:05 [2025-03-03 18:22:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:22:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600263', 'tblTempUsageDetail_20' ) start [2025-03-03 18:22:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600263', 'tblTempUsageDetail_20' ) end [2025-03-03 18:22:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600263', 'tblTempVendorCDR_20' ) start [2025-03-03 18:22:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600263', 'tblTempVendorCDR_20' ) end [2025-03-03 18:22:20] Production.INFO: ProcessCDR(1,14600263,1,1,2) [2025-03-03 18:22:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600263,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:22:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600263,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:22:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600263,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:22:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600263,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:22:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600263', 'tblTempUsageDetail_20' ) start [2025-03-03 18:22:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600263', 'tblTempUsageDetail_20' ) end [2025-03-03 18:22:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:22:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:22:23] Production.INFO: ==15565== Releasing lock... [2025-03-03 18:22:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:22:23] Production.INFO: 59 MB #Memory Used# [2025-03-03 18:23:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:23:05 [end_date_ymd] => 2025-03-03 18:23:05 [RateCDR] => 1 ) [2025-03-03 18:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 15:23:05' and `end` < '2025-03-03 18:23:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 18:23:18] Production.INFO: count ==4153 [2025-03-03 18:23:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:23:05 - End Time 2025-03-03 18:23:05 [2025-03-03 18:23:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:23:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600268', 'tblTempUsageDetail_20' ) start [2025-03-03 18:23:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600268', 'tblTempUsageDetail_20' ) end [2025-03-03 18:23:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600268', 'tblTempVendorCDR_20' ) start [2025-03-03 18:23:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600268', 'tblTempVendorCDR_20' ) end [2025-03-03 18:23:20] Production.INFO: ProcessCDR(1,14600268,1,1,2) [2025-03-03 18:23:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600268,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:23:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600268,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:23:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600268,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:23:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600268,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:23:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600268', 'tblTempUsageDetail_20' ) start [2025-03-03 18:23:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600268', 'tblTempUsageDetail_20' ) end [2025-03-03 18:23:25] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:23:25] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:23:25] Production.INFO: ==15709== Releasing lock... [2025-03-03 18:23:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:23:25] Production.INFO: 59 MB #Memory Used# [2025-03-03 18:24:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:24:06 [end_date_ymd] => 2025-03-03 18:24:06 [RateCDR] => 1 ) [2025-03-03 18: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-03 15:24:06' and `end` < '2025-03-03 18: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-03 18:24:19] Production.INFO: count ==4134 [2025-03-03 18:24:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:24:06 - End Time 2025-03-03 18:24:06 [2025-03-03 18:24:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:24:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600273', 'tblTempUsageDetail_20' ) start [2025-03-03 18:24:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600273', 'tblTempUsageDetail_20' ) end [2025-03-03 18:24:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600273', 'tblTempVendorCDR_20' ) start [2025-03-03 18:24:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600273', 'tblTempVendorCDR_20' ) end [2025-03-03 18:24:20] Production.INFO: ProcessCDR(1,14600273,1,1,2) [2025-03-03 18:24:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600273,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:24:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600273,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:24:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600273,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:24:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600273,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:24:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600273', 'tblTempUsageDetail_20' ) start [2025-03-03 18:24:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600273', 'tblTempUsageDetail_20' ) end [2025-03-03 18:24:25] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:24:25] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:24:25] Production.INFO: ==15812== Releasing lock... [2025-03-03 18:24:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:24:25] Production.INFO: 59 MB #Memory Used# [2025-03-03 18:25:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:25:05 [end_date_ymd] => 2025-03-03 18:25:05 [RateCDR] => 1 ) [2025-03-03 18:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 15:25:05' and `end` < '2025-03-03 18:25:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 18:25:18] Production.INFO: count ==4103 [2025-03-03 18:25:19] Production.ERROR: pbx CDR StartTime 2025-03-03 15:25:05 - End Time 2025-03-03 18:25:05 [2025-03-03 18:25:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:25:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600278', 'tblTempUsageDetail_20' ) start [2025-03-03 18:25:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600278', 'tblTempUsageDetail_20' ) end [2025-03-03 18:25:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600278', 'tblTempVendorCDR_20' ) start [2025-03-03 18:25:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600278', 'tblTempVendorCDR_20' ) end [2025-03-03 18:25:20] Production.INFO: ProcessCDR(1,14600278,1,1,2) [2025-03-03 18:25:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600278,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:25:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600278,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:25:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600278,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:25:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600278,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:25:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600278', 'tblTempUsageDetail_20' ) start [2025-03-03 18:25:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600278', 'tblTempUsageDetail_20' ) end [2025-03-03 18:25:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:25:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:25:24] Production.INFO: ==15911== Releasing lock... [2025-03-03 18:25:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:25:24] Production.INFO: 59 MB #Memory Used# [2025-03-03 18:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:26:05 [end_date_ymd] => 2025-03-03 18:26:05 [RateCDR] => 1 ) [2025-03-03 18:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 15:26:05' and `end` < '2025-03-03 18:26:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 18:26:18] Production.INFO: count ==4095 [2025-03-03 18:26:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:26:05 - End Time 2025-03-03 18:26:05 [2025-03-03 18:26:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:26:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600283', 'tblTempUsageDetail_20' ) start [2025-03-03 18:26:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600283', 'tblTempUsageDetail_20' ) end [2025-03-03 18:26:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600283', 'tblTempVendorCDR_20' ) start [2025-03-03 18:26:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600283', 'tblTempVendorCDR_20' ) end [2025-03-03 18:26:20] Production.INFO: ProcessCDR(1,14600283,1,1,2) [2025-03-03 18:26:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600283,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:26:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600283,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:26:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600283,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:26:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600283,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:26:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600283', 'tblTempUsageDetail_20' ) start [2025-03-03 18:26:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600283', 'tblTempUsageDetail_20' ) end [2025-03-03 18:26:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:26:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:26:24] Production.INFO: ==16013== Releasing lock... [2025-03-03 18:26:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:26:24] Production.INFO: 58.75 MB #Memory Used# [2025-03-03 18:27:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:27:05 [end_date_ymd] => 2025-03-03 18:27:05 [RateCDR] => 1 ) [2025-03-03 18:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 15:27:05' and `end` < '2025-03-03 18:27:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 18:27:18] Production.INFO: count ==4086 [2025-03-03 18:27:19] Production.ERROR: pbx CDR StartTime 2025-03-03 15:27:05 - End Time 2025-03-03 18:27:05 [2025-03-03 18:27:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:27:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600288', 'tblTempUsageDetail_20' ) start [2025-03-03 18:27:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600288', 'tblTempUsageDetail_20' ) end [2025-03-03 18:27:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600288', 'tblTempVendorCDR_20' ) start [2025-03-03 18:27:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600288', 'tblTempVendorCDR_20' ) end [2025-03-03 18:27:20] Production.INFO: ProcessCDR(1,14600288,1,1,2) [2025-03-03 18:27:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600288,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:27:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600288,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:27:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600288,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:27:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600288,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:27:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600288', 'tblTempUsageDetail_20' ) start [2025-03-03 18:27:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600288', 'tblTempUsageDetail_20' ) end [2025-03-03 18:27:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:27:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:27:23] Production.INFO: ==16110== Releasing lock... [2025-03-03 18:27:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:27:23] Production.INFO: 58.75 MB #Memory Used# [2025-03-03 18:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:28:05 [end_date_ymd] => 2025-03-03 18:28:05 [RateCDR] => 1 ) [2025-03-03 18:28:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 15:28:05' and `end` < '2025-03-03 18:28:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 18:28:18] Production.INFO: count ==4056 [2025-03-03 18:28:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:28:05 - End Time 2025-03-03 18:28:05 [2025-03-03 18:28:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:28:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600293', 'tblTempUsageDetail_20' ) start [2025-03-03 18:28:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600293', 'tblTempUsageDetail_20' ) end [2025-03-03 18:28:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600293', 'tblTempVendorCDR_20' ) start [2025-03-03 18:28:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600293', 'tblTempVendorCDR_20' ) end [2025-03-03 18:28:20] Production.INFO: ProcessCDR(1,14600293,1,1,2) [2025-03-03 18:28:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600293,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:28:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600293,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:28:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600293,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:28:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600293,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:28:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600293', 'tblTempUsageDetail_20' ) start [2025-03-03 18:28:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600293', 'tblTempUsageDetail_20' ) end [2025-03-03 18:28:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:28:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:28:24] Production.INFO: ==16212== Releasing lock... [2025-03-03 18:28:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:28:24] Production.INFO: 58.25 MB #Memory Used# [2025-03-03 18:29:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:29:05 [end_date_ymd] => 2025-03-03 18:29:05 [RateCDR] => 1 ) [2025-03-03 18:29:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 15:29:05' and `end` < '2025-03-03 18:29:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 18:29:18] Production.INFO: count ==4015 [2025-03-03 18:29:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:29:05 - End Time 2025-03-03 18:29:05 [2025-03-03 18:29:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:29:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600298', 'tblTempUsageDetail_20' ) start [2025-03-03 18:29:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600298', 'tblTempUsageDetail_20' ) end [2025-03-03 18:29:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600298', 'tblTempVendorCDR_20' ) start [2025-03-03 18:29:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600298', 'tblTempVendorCDR_20' ) end [2025-03-03 18:29:20] Production.INFO: ProcessCDR(1,14600298,1,1,2) [2025-03-03 18:29:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600298,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:29:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600298,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:29:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600298,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:29:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600298,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:29:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600298', 'tblTempUsageDetail_20' ) start [2025-03-03 18:29:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600298', 'tblTempUsageDetail_20' ) end [2025-03-03 18:29:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:29:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:29:24] Production.INFO: ==16325== Releasing lock... [2025-03-03 18:29:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:29:24] Production.INFO: 58.25 MB #Memory Used# [2025-03-03 18:30:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:30:06 [end_date_ymd] => 2025-03-03 18:30:06 [RateCDR] => 1 ) [2025-03-03 18:30:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 15:30:06' and `end` < '2025-03-03 18:30:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 18:30:19] Production.INFO: count ==3991 [2025-03-03 18:30:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:30:06 - End Time 2025-03-03 18:30:06 [2025-03-03 18:30:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:30:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600304', 'tblTempUsageDetail_20' ) start [2025-03-03 18:30:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600304', 'tblTempUsageDetail_20' ) end [2025-03-03 18:30:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600304', 'tblTempVendorCDR_20' ) start [2025-03-03 18:30:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600304', 'tblTempVendorCDR_20' ) end [2025-03-03 18:30:21] Production.INFO: ProcessCDR(1,14600304,1,1,2) [2025-03-03 18:30:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600304,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:30:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600304,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:30:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600304,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:30:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600304,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:30:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600304', 'tblTempUsageDetail_20' ) start [2025-03-03 18:30:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600304', 'tblTempUsageDetail_20' ) end [2025-03-03 18:30:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:30:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:30:24] Production.INFO: ==16427== Releasing lock... [2025-03-03 18:30:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:30:24] Production.INFO: 57.75 MB #Memory Used# [2025-03-03 18:31:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:31:06 [end_date_ymd] => 2025-03-03 18:31:06 [RateCDR] => 1 ) [2025-03-03 18: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-03 15:31:06' and `end` < '2025-03-03 18: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-03 18:31:19] Production.INFO: count ==3937 [2025-03-03 18:31:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:31:06 - End Time 2025-03-03 18:31:06 [2025-03-03 18:31:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:31:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600309', 'tblTempUsageDetail_20' ) start [2025-03-03 18:31:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600309', 'tblTempUsageDetail_20' ) end [2025-03-03 18:31:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600309', 'tblTempVendorCDR_20' ) start [2025-03-03 18:31:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600309', 'tblTempVendorCDR_20' ) end [2025-03-03 18:31:20] Production.INFO: ProcessCDR(1,14600309,1,1,2) [2025-03-03 18:31:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600309,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:31:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600309,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:31:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600309,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:31:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600309,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:31:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600309', 'tblTempUsageDetail_20' ) start [2025-03-03 18:31:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600309', 'tblTempUsageDetail_20' ) end [2025-03-03 18:31:25] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:31:25] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:31:25] Production.INFO: ==16528== Releasing lock... [2025-03-03 18:31:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:31:25] Production.INFO: 57.75 MB #Memory Used# [2025-03-03 18:32:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:32:06 [end_date_ymd] => 2025-03-03 18:32:06 [RateCDR] => 1 ) [2025-03-03 18:32:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 15:32:06' and `end` < '2025-03-03 18:32:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 18:32:18] Production.INFO: count ==3924 [2025-03-03 18:32:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:32:06 - End Time 2025-03-03 18:32:06 [2025-03-03 18:32:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:32:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600314', 'tblTempUsageDetail_20' ) start [2025-03-03 18:32:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600314', 'tblTempUsageDetail_20' ) end [2025-03-03 18:32:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600314', 'tblTempVendorCDR_20' ) start [2025-03-03 18:32:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600314', 'tblTempVendorCDR_20' ) end [2025-03-03 18:32:20] Production.INFO: ProcessCDR(1,14600314,1,1,2) [2025-03-03 18:32:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600314,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:32:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600314,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:32:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600314,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:32:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600314,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:32:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600314', 'tblTempUsageDetail_20' ) start [2025-03-03 18:32:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600314', 'tblTempUsageDetail_20' ) end [2025-03-03 18:32:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:32:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:32:23] Production.INFO: ==16629== Releasing lock... [2025-03-03 18:32:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:32:23] Production.INFO: 57.25 MB #Memory Used# [2025-03-03 18:33:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:33:06 [end_date_ymd] => 2025-03-03 18:33:06 [RateCDR] => 1 ) [2025-03-03 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-03 15:33:06' and `end` < '2025-03-03 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-03 18:33:19] Production.INFO: count ==3916 [2025-03-03 18:33:21] Production.ERROR: pbx CDR StartTime 2025-03-03 15:33:06 - End Time 2025-03-03 18:33:06 [2025-03-03 18:33:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:33:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600319', 'tblTempUsageDetail_20' ) start [2025-03-03 18:33:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600319', 'tblTempUsageDetail_20' ) end [2025-03-03 18:33:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600319', 'tblTempVendorCDR_20' ) start [2025-03-03 18:33:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600319', 'tblTempVendorCDR_20' ) end [2025-03-03 18:33:21] Production.INFO: ProcessCDR(1,14600319,1,1,2) [2025-03-03 18:33:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600319,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:33:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600319,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:33:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600319,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:33:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600319,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:33:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600319', 'tblTempUsageDetail_20' ) start [2025-03-03 18:33:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600319', 'tblTempUsageDetail_20' ) end [2025-03-03 18:33:25] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:33:25] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:33:25] Production.INFO: ==16734== Releasing lock... [2025-03-03 18:33:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:33:25] Production.INFO: 57.25 MB #Memory Used# [2025-03-03 18:34:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:34:05 [end_date_ymd] => 2025-03-03 18:34:05 [RateCDR] => 1 ) [2025-03-03 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-03 15:34:05' and `end` < '2025-03-03 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-03 18:34:18] Production.INFO: count ==3906 [2025-03-03 18:34:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:34:05 - End Time 2025-03-03 18:34:05 [2025-03-03 18:34:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:34:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600324', 'tblTempUsageDetail_20' ) start [2025-03-03 18:34:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600324', 'tblTempUsageDetail_20' ) end [2025-03-03 18:34:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600324', 'tblTempVendorCDR_20' ) start [2025-03-03 18:34:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600324', 'tblTempVendorCDR_20' ) end [2025-03-03 18:34:20] Production.INFO: ProcessCDR(1,14600324,1,1,2) [2025-03-03 18:34:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600324,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:34:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600324,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:34:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600324,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:34:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600324,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:34:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600324', 'tblTempUsageDetail_20' ) start [2025-03-03 18:34:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600324', 'tblTempUsageDetail_20' ) end [2025-03-03 18:34:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:34:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:34:23] Production.INFO: ==16839== Releasing lock... [2025-03-03 18:34:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:34:23] Production.INFO: 57.25 MB #Memory Used# [2025-03-03 18:35:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:35:05 [end_date_ymd] => 2025-03-03 18:35:05 [RateCDR] => 1 ) [2025-03-03 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-03 15:35:05' and `end` < '2025-03-03 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-03 18:35:18] Production.INFO: count ==3880 [2025-03-03 18:35:19] Production.ERROR: pbx CDR StartTime 2025-03-03 15:35:05 - End Time 2025-03-03 18:35:05 [2025-03-03 18:35:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:35:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600329', 'tblTempUsageDetail_20' ) start [2025-03-03 18:35:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600329', 'tblTempUsageDetail_20' ) end [2025-03-03 18:35:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600329', 'tblTempVendorCDR_20' ) start [2025-03-03 18:35:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600329', 'tblTempVendorCDR_20' ) end [2025-03-03 18:35:19] Production.INFO: ProcessCDR(1,14600329,1,1,2) [2025-03-03 18:35:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600329,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:35:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600329,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:35:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600329,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:35:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600329,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:35:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600329', 'tblTempUsageDetail_20' ) start [2025-03-03 18:35:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600329', 'tblTempUsageDetail_20' ) end [2025-03-03 18:35:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:35:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:35:24] Production.INFO: ==16942== Releasing lock... [2025-03-03 18:35:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:35:24] Production.INFO: 57 MB #Memory Used# [2025-03-03 18:36:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:36:05 [end_date_ymd] => 2025-03-03 18:36:05 [RateCDR] => 1 ) [2025-03-03 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-03 15:36:05' and `end` < '2025-03-03 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-03 18:36:18] Production.INFO: count ==3875 [2025-03-03 18:36:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:36:05 - End Time 2025-03-03 18:36:05 [2025-03-03 18:36:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:36:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600334', 'tblTempUsageDetail_20' ) start [2025-03-03 18:36:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600334', 'tblTempUsageDetail_20' ) end [2025-03-03 18:36:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600334', 'tblTempVendorCDR_20' ) start [2025-03-03 18:36:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600334', 'tblTempVendorCDR_20' ) end [2025-03-03 18:36:20] Production.INFO: ProcessCDR(1,14600334,1,1,2) [2025-03-03 18:36:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600334,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:36:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600334,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:36:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600334,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:36:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600334,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:36:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600334', 'tblTempUsageDetail_20' ) start [2025-03-03 18:36:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600334', 'tblTempUsageDetail_20' ) end [2025-03-03 18:36:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:36:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:36:23] Production.INFO: ==17048== Releasing lock... [2025-03-03 18:36:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:36:23] Production.INFO: 57.25 MB #Memory Used# [2025-03-03 18:37:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:37:05 [end_date_ymd] => 2025-03-03 18:37:05 [RateCDR] => 1 ) [2025-03-03 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-03 15:37:05' and `end` < '2025-03-03 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-03 18:37:17] Production.INFO: count ==3876 [2025-03-03 18:37:19] Production.ERROR: pbx CDR StartTime 2025-03-03 15:37:05 - End Time 2025-03-03 18:37:05 [2025-03-03 18:37:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:37:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600339', 'tblTempUsageDetail_20' ) start [2025-03-03 18:37:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600339', 'tblTempUsageDetail_20' ) end [2025-03-03 18:37:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600339', 'tblTempVendorCDR_20' ) start [2025-03-03 18:37:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600339', 'tblTempVendorCDR_20' ) end [2025-03-03 18:37:19] Production.INFO: ProcessCDR(1,14600339,1,1,2) [2025-03-03 18:37:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600339,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:37:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600339,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:37:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600339,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:37:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600339,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:37:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600339', 'tblTempUsageDetail_20' ) start [2025-03-03 18:37:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600339', 'tblTempUsageDetail_20' ) end [2025-03-03 18:37:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:37:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:37:23] Production.INFO: ==17151== Releasing lock... [2025-03-03 18:37:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:37:23] Production.INFO: 57.25 MB #Memory Used# [2025-03-03 18:38:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:38:05 [end_date_ymd] => 2025-03-03 18:38:05 [RateCDR] => 1 ) [2025-03-03 18: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-03 15:38:05' and `end` < '2025-03-03 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-03 18:38:18] Production.INFO: count ==3834 [2025-03-03 18:38:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:38:05 - End Time 2025-03-03 18:38:05 [2025-03-03 18:38:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:38:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600344', 'tblTempUsageDetail_20' ) start [2025-03-03 18:38:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600344', 'tblTempUsageDetail_20' ) end [2025-03-03 18:38:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600344', 'tblTempVendorCDR_20' ) start [2025-03-03 18:38:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600344', 'tblTempVendorCDR_20' ) end [2025-03-03 18:38:20] Production.INFO: ProcessCDR(1,14600344,1,1,2) [2025-03-03 18:38:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600344,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:38:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600344,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:38:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600344,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:38:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600344,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:38:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600344', 'tblTempUsageDetail_20' ) start [2025-03-03 18:38:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600344', 'tblTempUsageDetail_20' ) end [2025-03-03 18:38:25] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:38:25] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:38:25] Production.INFO: ==17293== Releasing lock... [2025-03-03 18:38:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:38:25] Production.INFO: 57 MB #Memory Used# [2025-03-03 18:39:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:39:06 [end_date_ymd] => 2025-03-03 18:39:06 [RateCDR] => 1 ) [2025-03-03 18: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-03 15:39:06' and `end` < '2025-03-03 18: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-03 18:39:18] Production.INFO: count ==3829 [2025-03-03 18:39:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:39:06 - End Time 2025-03-03 18:39:06 [2025-03-03 18:39:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:39:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600349', 'tblTempUsageDetail_20' ) start [2025-03-03 18:39:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600349', 'tblTempUsageDetail_20' ) end [2025-03-03 18:39:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600349', 'tblTempVendorCDR_20' ) start [2025-03-03 18:39:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600349', 'tblTempVendorCDR_20' ) end [2025-03-03 18:39:20] Production.INFO: ProcessCDR(1,14600349,1,1,2) [2025-03-03 18:39:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600349,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:39:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600349,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:39:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600349,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:39:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600349,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:39:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600349', 'tblTempUsageDetail_20' ) start [2025-03-03 18:39:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600349', 'tblTempUsageDetail_20' ) end [2025-03-03 18:39:25] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:39:25] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:39:25] Production.INFO: ==17395== Releasing lock... [2025-03-03 18:39:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:39:25] Production.INFO: 56.75 MB #Memory Used# [2025-03-03 18:40:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:40:05 [end_date_ymd] => 2025-03-03 18:40:05 [RateCDR] => 1 ) [2025-03-03 18:40:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 15:40:05' and `end` < '2025-03-03 18:40:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 18:40:18] Production.INFO: count ==3817 [2025-03-03 18:40:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:40:05 - End Time 2025-03-03 18:40:05 [2025-03-03 18:40:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:40:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600355', 'tblTempUsageDetail_20' ) start [2025-03-03 18:40:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600355', 'tblTempUsageDetail_20' ) end [2025-03-03 18:40:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600355', 'tblTempVendorCDR_20' ) start [2025-03-03 18:40:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600355', 'tblTempVendorCDR_20' ) end [2025-03-03 18:40:20] Production.INFO: ProcessCDR(1,14600355,1,1,2) [2025-03-03 18:40:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600355,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:40:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600355,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:40:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600355,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:40:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600355,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:40:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600355', 'tblTempUsageDetail_20' ) start [2025-03-03 18:40:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600355', 'tblTempUsageDetail_20' ) end [2025-03-03 18:40:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:40:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:40:23] Production.INFO: ==17500== Releasing lock... [2025-03-03 18:40:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:40:23] Production.INFO: 57 MB #Memory Used# [2025-03-03 18:41:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:41:05 [end_date_ymd] => 2025-03-03 18:41:05 [RateCDR] => 1 ) [2025-03-03 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-03 15:41:05' and `end` < '2025-03-03 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-03 18:41:18] Production.INFO: count ==3809 [2025-03-03 18:41:19] Production.ERROR: pbx CDR StartTime 2025-03-03 15:41:05 - End Time 2025-03-03 18:41:05 [2025-03-03 18:41:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:41:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600360', 'tblTempUsageDetail_20' ) start [2025-03-03 18:41:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600360', 'tblTempUsageDetail_20' ) end [2025-03-03 18:41:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600360', 'tblTempVendorCDR_20' ) start [2025-03-03 18:41:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600360', 'tblTempVendorCDR_20' ) end [2025-03-03 18:41:19] Production.INFO: ProcessCDR(1,14600360,1,1,2) [2025-03-03 18:41:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600360,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:41:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600360,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:41:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600360,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:41:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600360,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:41:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600360', 'tblTempUsageDetail_20' ) start [2025-03-03 18:41:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600360', 'tblTempUsageDetail_20' ) end [2025-03-03 18:41:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:41:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:41:23] Production.INFO: ==17611== Releasing lock... [2025-03-03 18:41:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:41:23] Production.INFO: 57.25 MB #Memory Used# [2025-03-03 18:42:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:42:05 [end_date_ymd] => 2025-03-03 18:42:05 [RateCDR] => 1 ) [2025-03-03 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-03 15:42:05' and `end` < '2025-03-03 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-03 18:42:18] Production.INFO: count ==3800 [2025-03-03 18:42:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:42:05 - End Time 2025-03-03 18:42:05 [2025-03-03 18:42:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:42:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600365', 'tblTempUsageDetail_20' ) start [2025-03-03 18:42:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600365', 'tblTempUsageDetail_20' ) end [2025-03-03 18:42:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600365', 'tblTempVendorCDR_20' ) start [2025-03-03 18:42:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600365', 'tblTempVendorCDR_20' ) end [2025-03-03 18:42:20] Production.INFO: ProcessCDR(1,14600365,1,1,2) [2025-03-03 18:42:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600365,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:42:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600365,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:42:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600365,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:42:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600365,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:42:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600365', 'tblTempUsageDetail_20' ) start [2025-03-03 18:42:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600365', 'tblTempUsageDetail_20' ) end [2025-03-03 18:42:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:42:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:42:23] Production.INFO: ==17714== Releasing lock... [2025-03-03 18:42:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:42:23] Production.INFO: 56.5 MB #Memory Used# [2025-03-03 18:43:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:43:05 [end_date_ymd] => 2025-03-03 18:43:05 [RateCDR] => 1 ) [2025-03-03 18:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 15:43:05' and `end` < '2025-03-03 18:43:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 18:43:18] Production.INFO: count ==3767 [2025-03-03 18:43:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:43:05 - End Time 2025-03-03 18:43:05 [2025-03-03 18:43:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:43:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600370', 'tblTempUsageDetail_20' ) start [2025-03-03 18:43:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600370', 'tblTempUsageDetail_20' ) end [2025-03-03 18:43:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600370', 'tblTempVendorCDR_20' ) start [2025-03-03 18:43:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600370', 'tblTempVendorCDR_20' ) end [2025-03-03 18:43:20] Production.INFO: ProcessCDR(1,14600370,1,1,2) [2025-03-03 18:43:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600370,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:43:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600370,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:43:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600370,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:43:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600370,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:43:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600370', 'tblTempUsageDetail_20' ) start [2025-03-03 18:43:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600370', 'tblTempUsageDetail_20' ) end [2025-03-03 18:43:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:43:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:43:23] Production.INFO: ==17812== Releasing lock... [2025-03-03 18:43:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:43:23] Production.INFO: 56.75 MB #Memory Used# [2025-03-03 18:44:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:44:05 [end_date_ymd] => 2025-03-03 18:44:05 [RateCDR] => 1 ) [2025-03-03 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-03 15:44:05' and `end` < '2025-03-03 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-03 18:44:18] Production.INFO: count ==3732 [2025-03-03 18:44:19] Production.ERROR: pbx CDR StartTime 2025-03-03 15:44:05 - End Time 2025-03-03 18:44:05 [2025-03-03 18:44:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:44:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600375', 'tblTempUsageDetail_20' ) start [2025-03-03 18:44:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600375', 'tblTempUsageDetail_20' ) end [2025-03-03 18:44:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600375', 'tblTempVendorCDR_20' ) start [2025-03-03 18:44:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600375', 'tblTempVendorCDR_20' ) end [2025-03-03 18:44:19] Production.INFO: ProcessCDR(1,14600375,1,1,2) [2025-03-03 18:44:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600375,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:44:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600375,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:44:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600375,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:44:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600375,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:44:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600375', 'tblTempUsageDetail_20' ) start [2025-03-03 18:44:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600375', 'tblTempUsageDetail_20' ) end [2025-03-03 18:44:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:44:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:44:24] Production.INFO: ==17910== Releasing lock... [2025-03-03 18:44:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:44:24] Production.INFO: 56.75 MB #Memory Used# [2025-03-03 18:45:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:45:05 [end_date_ymd] => 2025-03-03 18:45:05 [RateCDR] => 1 ) [2025-03-03 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-03 15:45:05' and `end` < '2025-03-03 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-03 18:45:18] Production.INFO: count ==3702 [2025-03-03 18:45:19] Production.ERROR: pbx CDR StartTime 2025-03-03 15:45:05 - End Time 2025-03-03 18:45:05 [2025-03-03 18:45:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:45:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600380', 'tblTempUsageDetail_20' ) start [2025-03-03 18:45:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600380', 'tblTempUsageDetail_20' ) end [2025-03-03 18:45:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600380', 'tblTempVendorCDR_20' ) start [2025-03-03 18:45:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600380', 'tblTempVendorCDR_20' ) end [2025-03-03 18:45:19] Production.INFO: ProcessCDR(1,14600380,1,1,2) [2025-03-03 18:45:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600380,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:45:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600380,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:45:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600380,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:45:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600380,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:45:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600380', 'tblTempUsageDetail_20' ) start [2025-03-03 18:45:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600380', 'tblTempUsageDetail_20' ) end [2025-03-03 18:45:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:45:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:45:24] Production.INFO: ==18012== Releasing lock... [2025-03-03 18:45:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:45:24] Production.INFO: 56.25 MB #Memory Used# [2025-03-03 18:46:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:46:05 [end_date_ymd] => 2025-03-03 18:46:05 [RateCDR] => 1 ) [2025-03-03 18:46:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 15:46:05' and `end` < '2025-03-03 18:46:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 18:46:18] Production.INFO: count ==3671 [2025-03-03 18:46:19] Production.ERROR: pbx CDR StartTime 2025-03-03 15:46:05 - End Time 2025-03-03 18:46:05 [2025-03-03 18:46:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:46:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600385', 'tblTempUsageDetail_20' ) start [2025-03-03 18:46:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600385', 'tblTempUsageDetail_20' ) end [2025-03-03 18:46:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600385', 'tblTempVendorCDR_20' ) start [2025-03-03 18:46:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600385', 'tblTempVendorCDR_20' ) end [2025-03-03 18:46:19] Production.INFO: ProcessCDR(1,14600385,1,1,2) [2025-03-03 18:46:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600385,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:46:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600385,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:46:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600385,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:46:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600385,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:46:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600385', 'tblTempUsageDetail_20' ) start [2025-03-03 18:46:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600385', 'tblTempUsageDetail_20' ) end [2025-03-03 18:46:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:46:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:46:24] Production.INFO: ==18115== Releasing lock... [2025-03-03 18:46:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:46:24] Production.INFO: 56.25 MB #Memory Used# [2025-03-03 18:47:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:47:06 [end_date_ymd] => 2025-03-03 18:47:06 [RateCDR] => 1 ) [2025-03-03 18:47:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 15:47:06' and `end` < '2025-03-03 18:47:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 18:47:18] Production.INFO: count ==3660 [2025-03-03 18:47:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:47:06 - End Time 2025-03-03 18:47:06 [2025-03-03 18:47:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:47:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600390', 'tblTempUsageDetail_20' ) start [2025-03-03 18:47:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600390', 'tblTempUsageDetail_20' ) end [2025-03-03 18:47:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600390', 'tblTempVendorCDR_20' ) start [2025-03-03 18:47:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600390', 'tblTempVendorCDR_20' ) end [2025-03-03 18:47:20] Production.INFO: ProcessCDR(1,14600390,1,1,2) [2025-03-03 18:47:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600390,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:47:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600390,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:47:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600390,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:47:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600390,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:47:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600390', 'tblTempUsageDetail_20' ) start [2025-03-03 18:47:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600390', 'tblTempUsageDetail_20' ) end [2025-03-03 18:47:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:47:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:47:23] Production.INFO: ==18221== Releasing lock... [2025-03-03 18:47:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:47:23] Production.INFO: 55.5 MB #Memory Used# [2025-03-03 18:48:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:48:05 [end_date_ymd] => 2025-03-03 18:48:05 [RateCDR] => 1 ) [2025-03-03 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-03 15:48:05' and `end` < '2025-03-03 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-03 18:48:18] Production.INFO: count ==3636 [2025-03-03 18:48:19] Production.ERROR: pbx CDR StartTime 2025-03-03 15:48:05 - End Time 2025-03-03 18:48:05 [2025-03-03 18:48:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:48:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600395', 'tblTempUsageDetail_20' ) start [2025-03-03 18:48:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600395', 'tblTempUsageDetail_20' ) end [2025-03-03 18:48:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600395', 'tblTempVendorCDR_20' ) start [2025-03-03 18:48:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600395', 'tblTempVendorCDR_20' ) end [2025-03-03 18:48:19] Production.INFO: ProcessCDR(1,14600395,1,1,2) [2025-03-03 18:48:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600395,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:48:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600395,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:48:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600395,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:48:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600395,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:48:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600395', 'tblTempUsageDetail_20' ) start [2025-03-03 18:48:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600395', 'tblTempUsageDetail_20' ) end [2025-03-03 18:48:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:48:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:48:24] Production.INFO: ==18333== Releasing lock... [2025-03-03 18:48:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:48:24] Production.INFO: 56.25 MB #Memory Used# [2025-03-03 18:49:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:49:05 [end_date_ymd] => 2025-03-03 18:49:05 [RateCDR] => 1 ) [2025-03-03 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-03 15:49:05' and `end` < '2025-03-03 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-03 18:49:18] Production.INFO: count ==3616 [2025-03-03 18:49:19] Production.ERROR: pbx CDR StartTime 2025-03-03 15:49:05 - End Time 2025-03-03 18:49:05 [2025-03-03 18:49:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:49:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600400', 'tblTempUsageDetail_20' ) start [2025-03-03 18:49:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600400', 'tblTempUsageDetail_20' ) end [2025-03-03 18:49:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600400', 'tblTempVendorCDR_20' ) start [2025-03-03 18:49:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600400', 'tblTempVendorCDR_20' ) end [2025-03-03 18:49:19] Production.INFO: ProcessCDR(1,14600400,1,1,2) [2025-03-03 18:49:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600400,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:49:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600400,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:49:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600400,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:49:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600400,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:49:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600400', 'tblTempUsageDetail_20' ) start [2025-03-03 18:49:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600400', 'tblTempUsageDetail_20' ) end [2025-03-03 18:49:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:49:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:49:23] Production.INFO: ==18436== Releasing lock... [2025-03-03 18:49:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:49:23] Production.INFO: 55.5 MB #Memory Used# [2025-03-03 18:50:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:50:06 [end_date_ymd] => 2025-03-03 18:50:06 [RateCDR] => 1 ) [2025-03-03 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-03 15:50:06' and `end` < '2025-03-03 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-03 18:50:19] Production.INFO: count ==3594 [2025-03-03 18:50:21] Production.ERROR: pbx CDR StartTime 2025-03-03 15:50:06 - End Time 2025-03-03 18:50:06 [2025-03-03 18:50:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:50:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600406', 'tblTempUsageDetail_20' ) start [2025-03-03 18:50:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600406', 'tblTempUsageDetail_20' ) end [2025-03-03 18:50:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600406', 'tblTempVendorCDR_20' ) start [2025-03-03 18:50:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600406', 'tblTempVendorCDR_20' ) end [2025-03-03 18:50:21] Production.INFO: ProcessCDR(1,14600406,1,1,2) [2025-03-03 18:50:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600406,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:50:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600406,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:50:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600406,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:50:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600406,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:50:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600406', 'tblTempUsageDetail_20' ) start [2025-03-03 18:50:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600406', 'tblTempUsageDetail_20' ) end [2025-03-03 18:50:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:50:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:50:26] Production.INFO: ==18542== Releasing lock... [2025-03-03 18:50:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:50:26] Production.INFO: 56.5 MB #Memory Used# [2025-03-03 18:51:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:51:05 [end_date_ymd] => 2025-03-03 18:51:05 [RateCDR] => 1 ) [2025-03-03 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-03 15:51:05' and `end` < '2025-03-03 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-03 18:51:18] Production.INFO: count ==3553 [2025-03-03 18:51:19] Production.ERROR: pbx CDR StartTime 2025-03-03 15:51:05 - End Time 2025-03-03 18:51:05 [2025-03-03 18:51:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:51:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600411', 'tblTempUsageDetail_20' ) start [2025-03-03 18:51:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600411', 'tblTempUsageDetail_20' ) end [2025-03-03 18:51:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600411', 'tblTempVendorCDR_20' ) start [2025-03-03 18:51:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600411', 'tblTempVendorCDR_20' ) end [2025-03-03 18:51:20] Production.INFO: ProcessCDR(1,14600411,1,1,2) [2025-03-03 18:51:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600411,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:51:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600411,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:51:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600411,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:51:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600411,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:51:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600411', 'tblTempUsageDetail_20' ) start [2025-03-03 18:51:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600411', 'tblTempUsageDetail_20' ) end [2025-03-03 18:51:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:51:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:51:23] Production.INFO: ==18645== Releasing lock... [2025-03-03 18:51:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:51:23] Production.INFO: 54.75 MB #Memory Used# [2025-03-03 18:52:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:52:05 [end_date_ymd] => 2025-03-03 18:52:05 [RateCDR] => 1 ) [2025-03-03 18:52:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 15:52:05' and `end` < '2025-03-03 18:52:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 18:52:18] Production.INFO: count ==3511 [2025-03-03 18:52:19] Production.ERROR: pbx CDR StartTime 2025-03-03 15:52:05 - End Time 2025-03-03 18:52:05 [2025-03-03 18:52:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:52:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600416', 'tblTempUsageDetail_20' ) start [2025-03-03 18:52:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600416', 'tblTempUsageDetail_20' ) end [2025-03-03 18:52:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600416', 'tblTempVendorCDR_20' ) start [2025-03-03 18:52:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600416', 'tblTempVendorCDR_20' ) end [2025-03-03 18:52:19] Production.INFO: ProcessCDR(1,14600416,1,1,2) [2025-03-03 18:52:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600416,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:52:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600416,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:52:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600416,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:52:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600416,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:52:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600416', 'tblTempUsageDetail_20' ) start [2025-03-03 18:52:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600416', 'tblTempUsageDetail_20' ) end [2025-03-03 18:52:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:52:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:52:24] Production.INFO: ==18743== Releasing lock... [2025-03-03 18:52:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:52:24] Production.INFO: 54.25 MB #Memory Used# [2025-03-03 18:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:53:05 [end_date_ymd] => 2025-03-03 18:53:05 [RateCDR] => 1 ) [2025-03-03 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-03 15:53:05' and `end` < '2025-03-03 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-03 18:53:18] Production.INFO: count ==3502 [2025-03-03 18:53:19] Production.ERROR: pbx CDR StartTime 2025-03-03 15:53:05 - End Time 2025-03-03 18:53:05 [2025-03-03 18:53:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:53:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600421', 'tblTempUsageDetail_20' ) start [2025-03-03 18:53:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600421', 'tblTempUsageDetail_20' ) end [2025-03-03 18:53:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600421', 'tblTempVendorCDR_20' ) start [2025-03-03 18:53:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600421', 'tblTempVendorCDR_20' ) end [2025-03-03 18:53:19] Production.INFO: ProcessCDR(1,14600421,1,1,2) [2025-03-03 18:53:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600421,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:53:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600421,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:53:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600421,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:53:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600421,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:53:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600421', 'tblTempUsageDetail_20' ) start [2025-03-03 18:53:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600421', 'tblTempUsageDetail_20' ) end [2025-03-03 18:53:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:53:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:53:23] Production.INFO: ==18851== Releasing lock... [2025-03-03 18:53:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:53:23] Production.INFO: 55.5 MB #Memory Used# [2025-03-03 18:54:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:54:06 [end_date_ymd] => 2025-03-03 18:54:06 [RateCDR] => 1 ) [2025-03-03 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-03 15:54:06' and `end` < '2025-03-03 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-03 18:54:18] Production.INFO: count ==3467 [2025-03-03 18:54:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:54:06 - End Time 2025-03-03 18:54:06 [2025-03-03 18:54:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:54:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600426', 'tblTempUsageDetail_20' ) start [2025-03-03 18:54:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600426', 'tblTempUsageDetail_20' ) end [2025-03-03 18:54:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600426', 'tblTempVendorCDR_20' ) start [2025-03-03 18:54:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600426', 'tblTempVendorCDR_20' ) end [2025-03-03 18:54:20] Production.INFO: ProcessCDR(1,14600426,1,1,2) [2025-03-03 18:54:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600426,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:54:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600426,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:54:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600426,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:54:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600426,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:54:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600426', 'tblTempUsageDetail_20' ) start [2025-03-03 18:54:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600426', 'tblTempUsageDetail_20' ) end [2025-03-03 18:54:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:54:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:54:24] Production.INFO: ==18997== Releasing lock... [2025-03-03 18:54:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:54:24] Production.INFO: 54.25 MB #Memory Used# [2025-03-03 18:55:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:55:06 [end_date_ymd] => 2025-03-03 18:55:06 [RateCDR] => 1 ) [2025-03-03 18: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-03 15:55:06' and `end` < '2025-03-03 18: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-03 18:55:18] Production.INFO: count ==3447 [2025-03-03 18:55:19] Production.ERROR: pbx CDR StartTime 2025-03-03 15:55:06 - End Time 2025-03-03 18:55:06 [2025-03-03 18:55:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:55:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600431', 'tblTempUsageDetail_20' ) start [2025-03-03 18:55:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600431', 'tblTempUsageDetail_20' ) end [2025-03-03 18:55:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600431', 'tblTempVendorCDR_20' ) start [2025-03-03 18:55:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600431', 'tblTempVendorCDR_20' ) end [2025-03-03 18:55:20] Production.INFO: ProcessCDR(1,14600431,1,1,2) [2025-03-03 18:55:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600431,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:55:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600431,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:55:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600431,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:55:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600431,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:55:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600431', 'tblTempUsageDetail_20' ) start [2025-03-03 18:55:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600431', 'tblTempUsageDetail_20' ) end [2025-03-03 18:55:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:55:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:55:23] Production.INFO: ==19105== Releasing lock... [2025-03-03 18:55:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:55:23] Production.INFO: 54.25 MB #Memory Used# [2025-03-03 18:56:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:56:06 [end_date_ymd] => 2025-03-03 18:56:06 [RateCDR] => 1 ) [2025-03-03 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-03 15:56:06' and `end` < '2025-03-03 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-03 18:56:18] Production.INFO: count ==3425 [2025-03-03 18:56:20] Production.ERROR: pbx CDR StartTime 2025-03-03 15:56:06 - End Time 2025-03-03 18:56:06 [2025-03-03 18:56:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:56:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600436', 'tblTempUsageDetail_20' ) start [2025-03-03 18:56:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600436', 'tblTempUsageDetail_20' ) end [2025-03-03 18:56:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600436', 'tblTempVendorCDR_20' ) start [2025-03-03 18:56:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600436', 'tblTempVendorCDR_20' ) end [2025-03-03 18:56:20] Production.INFO: ProcessCDR(1,14600436,1,1,2) [2025-03-03 18:56:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600436,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:56:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600436,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:56:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600436,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:56:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600436,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:56:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600436', 'tblTempUsageDetail_20' ) start [2025-03-03 18:56:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600436', 'tblTempUsageDetail_20' ) end [2025-03-03 18:56:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:56:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:56:24] Production.INFO: ==19207== Releasing lock... [2025-03-03 18:56:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:56:24] Production.INFO: 55.25 MB #Memory Used# [2025-03-03 18:57:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:57:05 [end_date_ymd] => 2025-03-03 18:57:05 [RateCDR] => 1 ) [2025-03-03 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-03 15:57:05' and `end` < '2025-03-03 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-03 18:57:18] Production.INFO: count ==3394 [2025-03-03 18:57:19] Production.ERROR: pbx CDR StartTime 2025-03-03 15:57:05 - End Time 2025-03-03 18:57:05 [2025-03-03 18:57:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:57:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600441', 'tblTempUsageDetail_20' ) start [2025-03-03 18:57:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600441', 'tblTempUsageDetail_20' ) end [2025-03-03 18:57:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600441', 'tblTempVendorCDR_20' ) start [2025-03-03 18:57:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600441', 'tblTempVendorCDR_20' ) end [2025-03-03 18:57:19] Production.INFO: ProcessCDR(1,14600441,1,1,2) [2025-03-03 18:57:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600441,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:57:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600441,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:57:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600441,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:57:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600441,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:57:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600441', 'tblTempUsageDetail_20' ) start [2025-03-03 18:57:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600441', 'tblTempUsageDetail_20' ) end [2025-03-03 18:57:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:57:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:57:24] Production.INFO: ==19306== Releasing lock... [2025-03-03 18:57:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:57:24] Production.INFO: 53.75 MB #Memory Used# [2025-03-03 18:58:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:58:05 [end_date_ymd] => 2025-03-03 18:58:05 [RateCDR] => 1 ) [2025-03-03 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-03 15:58:05' and `end` < '2025-03-03 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-03 18:58:18] Production.INFO: count ==3382 [2025-03-03 18:58:19] Production.ERROR: pbx CDR StartTime 2025-03-03 15:58:05 - End Time 2025-03-03 18:58:05 [2025-03-03 18:58:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:58:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600446', 'tblTempUsageDetail_20' ) start [2025-03-03 18:58:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600446', 'tblTempUsageDetail_20' ) end [2025-03-03 18:58:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600446', 'tblTempVendorCDR_20' ) start [2025-03-03 18:58:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600446', 'tblTempVendorCDR_20' ) end [2025-03-03 18:58:19] Production.INFO: ProcessCDR(1,14600446,1,1,2) [2025-03-03 18:58:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600446,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:58:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600446,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:58:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600446,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:58:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600446,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:58:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600446', 'tblTempUsageDetail_20' ) start [2025-03-03 18:58:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600446', 'tblTempUsageDetail_20' ) end [2025-03-03 18:58:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:58:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:58:24] Production.INFO: ==19409== Releasing lock... [2025-03-03 18:58:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:58:24] Production.INFO: 54 MB #Memory Used# [2025-03-03 18:59:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 15:59:05 [end_date_ymd] => 2025-03-03 18:59:05 [RateCDR] => 1 ) [2025-03-03 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-03 15:59:05' and `end` < '2025-03-03 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-03 18:59:18] Production.INFO: count ==3359 [2025-03-03 18:59:19] Production.ERROR: pbx CDR StartTime 2025-03-03 15:59:05 - End Time 2025-03-03 18:59:05 [2025-03-03 18:59:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 18:59:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600451', 'tblTempUsageDetail_20' ) start [2025-03-03 18:59:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600451', 'tblTempUsageDetail_20' ) end [2025-03-03 18:59:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600451', 'tblTempVendorCDR_20' ) start [2025-03-03 18:59:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600451', 'tblTempVendorCDR_20' ) end [2025-03-03 18:59:19] Production.INFO: ProcessCDR(1,14600451,1,1,2) [2025-03-03 18:59:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600451,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:59:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600451,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 18:59:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600451,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:59:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600451,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 18:59:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600451', 'tblTempUsageDetail_20' ) start [2025-03-03 18:59:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600451', 'tblTempUsageDetail_20' ) end [2025-03-03 18:59:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 18:59:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 18:59:22] Production.INFO: ==19480== Releasing lock... [2025-03-03 18:59:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 18:59:22] Production.INFO: 53.75 MB #Memory Used# [2025-03-03 19:00:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:00:07 [end_date_ymd] => 2025-03-03 19:00:07 [RateCDR] => 1 ) [2025-03-03 19: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-03 16:00:07' and `end` < '2025-03-03 19: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-03 19:00:19] Production.INFO: count ==3344 [2025-03-03 19:00:20] Production.ERROR: pbx CDR StartTime 2025-03-03 16:00:07 - End Time 2025-03-03 19:00:07 [2025-03-03 19:00:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:00:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600457', 'tblTempUsageDetail_20' ) start [2025-03-03 19:00:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600457', 'tblTempUsageDetail_20' ) end [2025-03-03 19:00:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600457', 'tblTempVendorCDR_20' ) start [2025-03-03 19:00:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600457', 'tblTempVendorCDR_20' ) end [2025-03-03 19:00:21] Production.INFO: ProcessCDR(1,14600457,1,1,2) [2025-03-03 19:00:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600457,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:00:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600457,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:00:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600457,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:00:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600457,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:00:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600457', 'tblTempUsageDetail_20' ) start [2025-03-03 19:00:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600457', 'tblTempUsageDetail_20' ) end [2025-03-03 19:00:26] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:00:26] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:00:26] Production.INFO: ==19559== Releasing lock... [2025-03-03 19:00:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:00:26] Production.INFO: 53 MB #Memory Used# [2025-03-03 19:01:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:01:05 [end_date_ymd] => 2025-03-03 19:01:05 [RateCDR] => 1 ) [2025-03-03 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-03 16:01:05' and `end` < '2025-03-03 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-03 19:01:18] Production.INFO: count ==3283 [2025-03-03 19:01:19] Production.ERROR: pbx CDR StartTime 2025-03-03 16:01:05 - End Time 2025-03-03 19:01:05 [2025-03-03 19:01:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:01:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600462', 'tblTempUsageDetail_20' ) start [2025-03-03 19:01:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600462', 'tblTempUsageDetail_20' ) end [2025-03-03 19:01:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600462', 'tblTempVendorCDR_20' ) start [2025-03-03 19:01:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600462', 'tblTempVendorCDR_20' ) end [2025-03-03 19:01:19] Production.INFO: ProcessCDR(1,14600462,1,1,2) [2025-03-03 19:01:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600462,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:01:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600462,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:01:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600462,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:01:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600462,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:01:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600462', 'tblTempUsageDetail_20' ) start [2025-03-03 19:01:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600462', 'tblTempUsageDetail_20' ) end [2025-03-03 19:01:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:01:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:01:23] Production.INFO: ==19687== Releasing lock... [2025-03-03 19:01:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:01:23] Production.INFO: 52.75 MB #Memory Used# [2025-03-03 19:02:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:02:04 [end_date_ymd] => 2025-03-03 19:02:04 [RateCDR] => 1 ) [2025-03-03 19: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-03 16:02:04' and `end` < '2025-03-03 19:02:04' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 19:02:17] Production.INFO: count ==3246 [2025-03-03 19:02:18] Production.ERROR: pbx CDR StartTime 2025-03-03 16:02:04 - End Time 2025-03-03 19:02:04 [2025-03-03 19:02:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600464', 'tblTempUsageDetail_20' ) start [2025-03-03 19:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600464', 'tblTempUsageDetail_20' ) end [2025-03-03 19:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600464', 'tblTempVendorCDR_20' ) start [2025-03-03 19:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600464', 'tblTempVendorCDR_20' ) end [2025-03-03 19:02:18] Production.INFO: ProcessCDR(1,14600464,1,1,2) [2025-03-03 19:02:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600464,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:02:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600464,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:02:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600464,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:02:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600464,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:02:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600464', 'tblTempUsageDetail_20' ) start [2025-03-03 19:02:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600464', 'tblTempUsageDetail_20' ) end [2025-03-03 19:02:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:02:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:02:22] Production.INFO: ==19798== Releasing lock... [2025-03-03 19:02:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:02:22] Production.INFO: 52.25 MB #Memory Used# [2025-03-03 19:03:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:03:05 [end_date_ymd] => 2025-03-03 19:03:05 [RateCDR] => 1 ) [2025-03-03 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-03 16:03:05' and `end` < '2025-03-03 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-03 19:03:17] Production.INFO: count ==3190 [2025-03-03 19:03:19] Production.ERROR: pbx CDR StartTime 2025-03-03 16:03:05 - End Time 2025-03-03 19:03:05 [2025-03-03 19:03:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:03:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600472', 'tblTempUsageDetail_20' ) start [2025-03-03 19:03:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600472', 'tblTempUsageDetail_20' ) end [2025-03-03 19:03:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600472', 'tblTempVendorCDR_20' ) start [2025-03-03 19:03:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600472', 'tblTempVendorCDR_20' ) end [2025-03-03 19:03:19] Production.INFO: ProcessCDR(1,14600472,1,1,2) [2025-03-03 19:03:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600472,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:03:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600472,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:03:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600472,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:03:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600472,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:03:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600472', 'tblTempUsageDetail_20' ) start [2025-03-03 19:03:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600472', 'tblTempUsageDetail_20' ) end [2025-03-03 19:03:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:03:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:03:22] Production.INFO: ==19870== Releasing lock... [2025-03-03 19:03:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:03:22] Production.INFO: 51.75 MB #Memory Used# [2025-03-03 19:04:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:04:06 [end_date_ymd] => 2025-03-03 19:04:06 [RateCDR] => 1 ) [2025-03-03 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-03 16:04:06' and `end` < '2025-03-03 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-03 19:04:18] Production.INFO: count ==3166 [2025-03-03 19:04:20] Production.ERROR: pbx CDR StartTime 2025-03-03 16:04:06 - End Time 2025-03-03 19:04:06 [2025-03-03 19:04:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:04:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600477', 'tblTempUsageDetail_20' ) start [2025-03-03 19:04:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600477', 'tblTempUsageDetail_20' ) end [2025-03-03 19:04:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600477', 'tblTempVendorCDR_20' ) start [2025-03-03 19:04:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600477', 'tblTempVendorCDR_20' ) end [2025-03-03 19:04:20] Production.INFO: ProcessCDR(1,14600477,1,1,2) [2025-03-03 19:04:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600477,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:04:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600477,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:04:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600477,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:04:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600477,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:04:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600477', 'tblTempUsageDetail_20' ) start [2025-03-03 19:04:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600477', 'tblTempUsageDetail_20' ) end [2025-03-03 19:04:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:04:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:04:23] Production.INFO: ==19942== Releasing lock... [2025-03-03 19:04:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:04:23] Production.INFO: 51.75 MB #Memory Used# [2025-03-03 19:05:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:05:05 [end_date_ymd] => 2025-03-03 19:05:05 [RateCDR] => 1 ) [2025-03-03 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-03 16:05:05' and `end` < '2025-03-03 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-03 19:05:18] Production.INFO: count ==3152 [2025-03-03 19:05:19] Production.ERROR: pbx CDR StartTime 2025-03-03 16:05:05 - End Time 2025-03-03 19:05:05 [2025-03-03 19:05:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:05:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600482', 'tblTempUsageDetail_20' ) start [2025-03-03 19:05:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600482', 'tblTempUsageDetail_20' ) end [2025-03-03 19:05:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600482', 'tblTempVendorCDR_20' ) start [2025-03-03 19:05:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600482', 'tblTempVendorCDR_20' ) end [2025-03-03 19:05:19] Production.INFO: ProcessCDR(1,14600482,1,1,2) [2025-03-03 19:05:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600482,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:05:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600482,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:05:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600482,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:05:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600482,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:05:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600482', 'tblTempUsageDetail_20' ) start [2025-03-03 19:05:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600482', 'tblTempUsageDetail_20' ) end [2025-03-03 19:05:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:05:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:05:24] Production.INFO: ==20089== Releasing lock... [2025-03-03 19:05:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:05:24] Production.INFO: 51.5 MB #Memory Used# [2025-03-03 19:06:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:06:05 [end_date_ymd] => 2025-03-03 19:06:05 [RateCDR] => 1 ) [2025-03-03 19:06:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 16:06:05' and `end` < '2025-03-03 19:06:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 19:06:18] Production.INFO: count ==3121 [2025-03-03 19:06:19] Production.ERROR: pbx CDR StartTime 2025-03-03 16:06:05 - End Time 2025-03-03 19:06:05 [2025-03-03 19:06:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:06:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600487', 'tblTempUsageDetail_20' ) start [2025-03-03 19:06:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600487', 'tblTempUsageDetail_20' ) end [2025-03-03 19:06:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600487', 'tblTempVendorCDR_20' ) start [2025-03-03 19:06:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600487', 'tblTempVendorCDR_20' ) end [2025-03-03 19:06:19] Production.INFO: ProcessCDR(1,14600487,1,1,2) [2025-03-03 19:06:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600487,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:06:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600487,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:06:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600487,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:06:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600487,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:06:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600487', 'tblTempUsageDetail_20' ) start [2025-03-03 19:06:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600487', 'tblTempUsageDetail_20' ) end [2025-03-03 19:06:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:06:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:06:24] Production.INFO: ==20168== Releasing lock... [2025-03-03 19:06:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:06:24] Production.INFO: 51.25 MB #Memory Used# [2025-03-03 19:07:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:07:05 [end_date_ymd] => 2025-03-03 19:07:05 [RateCDR] => 1 ) [2025-03-03 19:07:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 16:07:05' and `end` < '2025-03-03 19:07:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 19:07:17] Production.INFO: count ==3100 [2025-03-03 19:07:18] Production.ERROR: pbx CDR StartTime 2025-03-03 16:07:05 - End Time 2025-03-03 19:07:05 [2025-03-03 19:07:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600492', 'tblTempUsageDetail_20' ) start [2025-03-03 19:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600492', 'tblTempUsageDetail_20' ) end [2025-03-03 19:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600492', 'tblTempVendorCDR_20' ) start [2025-03-03 19:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600492', 'tblTempVendorCDR_20' ) end [2025-03-03 19:07:18] Production.INFO: ProcessCDR(1,14600492,1,1,2) [2025-03-03 19:07:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600492,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:07:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600492,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:07:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600492,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:07:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600492,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:07:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600492', 'tblTempUsageDetail_20' ) start [2025-03-03 19:07:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600492', 'tblTempUsageDetail_20' ) end [2025-03-03 19:07:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:07:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:07:22] Production.INFO: ==20245== Releasing lock... [2025-03-03 19:07:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:07:22] Production.INFO: 51.25 MB #Memory Used# [2025-03-03 19:08:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:08:05 [end_date_ymd] => 2025-03-03 19:08:05 [RateCDR] => 1 ) [2025-03-03 19:08:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 16:08:05' and `end` < '2025-03-03 19:08:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 19:08:18] Production.INFO: count ==3087 [2025-03-03 19:08:19] Production.ERROR: pbx CDR StartTime 2025-03-03 16:08:05 - End Time 2025-03-03 19:08:05 [2025-03-03 19:08:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:08:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600497', 'tblTempUsageDetail_20' ) start [2025-03-03 19:08:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600497', 'tblTempUsageDetail_20' ) end [2025-03-03 19:08:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600497', 'tblTempVendorCDR_20' ) start [2025-03-03 19:08:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600497', 'tblTempVendorCDR_20' ) end [2025-03-03 19:08:19] Production.INFO: ProcessCDR(1,14600497,1,1,2) [2025-03-03 19:08:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600497,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:08:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600497,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:08:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600497,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:08:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600497,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:08:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600497', 'tblTempUsageDetail_20' ) start [2025-03-03 19:08:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600497', 'tblTempUsageDetail_20' ) end [2025-03-03 19:08:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:08:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:08:24] Production.INFO: ==20395== Releasing lock... [2025-03-03 19:08:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:08:24] Production.INFO: 51 MB #Memory Used# [2025-03-03 19:09:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:09:05 [end_date_ymd] => 2025-03-03 19:09:05 [RateCDR] => 1 ) [2025-03-03 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-03 16:09:05' and `end` < '2025-03-03 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-03 19:09:17] Production.INFO: count ==3081 [2025-03-03 19:09:18] Production.ERROR: pbx CDR StartTime 2025-03-03 16:09:05 - End Time 2025-03-03 19:09:05 [2025-03-03 19:09:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600502', 'tblTempUsageDetail_20' ) start [2025-03-03 19:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600502', 'tblTempUsageDetail_20' ) end [2025-03-03 19:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600502', 'tblTempVendorCDR_20' ) start [2025-03-03 19:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600502', 'tblTempVendorCDR_20' ) end [2025-03-03 19:09:18] Production.INFO: ProcessCDR(1,14600502,1,1,2) [2025-03-03 19:09:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600502,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:09:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600502,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:09:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600502,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:09:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600502,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:09:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600502', 'tblTempUsageDetail_20' ) start [2025-03-03 19:09:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600502', 'tblTempUsageDetail_20' ) end [2025-03-03 19:09:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:09:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:09:22] Production.INFO: ==20509== Releasing lock... [2025-03-03 19:09:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:09:22] Production.INFO: 51 MB #Memory Used# [2025-03-03 19:10:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:10:06 [end_date_ymd] => 2025-03-03 19:10:06 [RateCDR] => 1 ) [2025-03-03 19:10:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 16:10:06' and `end` < '2025-03-03 19:10:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 19:10:19] Production.INFO: count ==3031 [2025-03-03 19:10:20] Production.ERROR: pbx CDR StartTime 2025-03-03 16:10:06 - End Time 2025-03-03 19:10:06 [2025-03-03 19:10:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:10:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600508', 'tblTempUsageDetail_20' ) start [2025-03-03 19:10:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600508', 'tblTempUsageDetail_20' ) end [2025-03-03 19:10:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600508', 'tblTempVendorCDR_20' ) start [2025-03-03 19:10:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600508', 'tblTempVendorCDR_20' ) end [2025-03-03 19:10:20] Production.INFO: ProcessCDR(1,14600508,1,1,2) [2025-03-03 19:10:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600508,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:10:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600508,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:10:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600508,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:10:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600508,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:10:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600508', 'tblTempUsageDetail_20' ) start [2025-03-03 19:10:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600508', 'tblTempUsageDetail_20' ) end [2025-03-03 19:10:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:10:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:10:23] Production.INFO: ==20585== Releasing lock... [2025-03-03 19:10:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:10:23] Production.INFO: 50.75 MB #Memory Used# [2025-03-03 19:11:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:11:05 [end_date_ymd] => 2025-03-03 19:11:05 [RateCDR] => 1 ) [2025-03-03 19:11:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 16:11:05' and `end` < '2025-03-03 19:11:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 19:11:18] Production.INFO: count ==2966 [2025-03-03 19:11:19] Production.ERROR: pbx CDR StartTime 2025-03-03 16:11:05 - End Time 2025-03-03 19:11:05 [2025-03-03 19:11:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:11:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600513', 'tblTempUsageDetail_20' ) start [2025-03-03 19:11:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600513', 'tblTempUsageDetail_20' ) end [2025-03-03 19:11:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600513', 'tblTempVendorCDR_20' ) start [2025-03-03 19:11:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600513', 'tblTempVendorCDR_20' ) end [2025-03-03 19:11:19] Production.INFO: ProcessCDR(1,14600513,1,1,2) [2025-03-03 19:11:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600513,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:11:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600513,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:11:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600513,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:11:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600513,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:11:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600513', 'tblTempUsageDetail_20' ) start [2025-03-03 19:11:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600513', 'tblTempUsageDetail_20' ) end [2025-03-03 19:11:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:11:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:11:24] Production.INFO: ==20661== Releasing lock... [2025-03-03 19:11:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:11:24] Production.INFO: 50.5 MB #Memory Used# [2025-03-03 19:12:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:12:06 [end_date_ymd] => 2025-03-03 19:12:06 [RateCDR] => 1 ) [2025-03-03 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-03 16:12:06' and `end` < '2025-03-03 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-03 19:12:18] Production.INFO: count ==2949 [2025-03-03 19:12:19] Production.ERROR: pbx CDR StartTime 2025-03-03 16:12:06 - End Time 2025-03-03 19:12:06 [2025-03-03 19:12:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:12:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600518', 'tblTempUsageDetail_20' ) start [2025-03-03 19:12:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600518', 'tblTempUsageDetail_20' ) end [2025-03-03 19:12:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600518', 'tblTempVendorCDR_20' ) start [2025-03-03 19:12:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600518', 'tblTempVendorCDR_20' ) end [2025-03-03 19:12:19] Production.INFO: ProcessCDR(1,14600518,1,1,2) [2025-03-03 19:12:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600518,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:12:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600518,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:12:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600518,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:12:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600518,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:12:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600518', 'tblTempUsageDetail_20' ) start [2025-03-03 19:12:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600518', 'tblTempUsageDetail_20' ) end [2025-03-03 19:12:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:12:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:12:24] Production.INFO: ==20814== Releasing lock... [2025-03-03 19:12:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:12:24] Production.INFO: 50 MB #Memory Used# [2025-03-03 19:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:13:05 [end_date_ymd] => 2025-03-03 19:13:05 [RateCDR] => 1 ) [2025-03-03 19:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 16:13:05' and `end` < '2025-03-03 19:13:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 19:13:17] Production.INFO: count ==2943 [2025-03-03 19:13:18] Production.ERROR: pbx CDR StartTime 2025-03-03 16:13:05 - End Time 2025-03-03 19:13:05 [2025-03-03 19:13:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600523', 'tblTempUsageDetail_20' ) start [2025-03-03 19:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600523', 'tblTempUsageDetail_20' ) end [2025-03-03 19:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600523', 'tblTempVendorCDR_20' ) start [2025-03-03 19:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600523', 'tblTempVendorCDR_20' ) end [2025-03-03 19:13:18] Production.INFO: ProcessCDR(1,14600523,1,1,2) [2025-03-03 19:13:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600523,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:13:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600523,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:13:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600523,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:13:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600523,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:13:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600523', 'tblTempUsageDetail_20' ) start [2025-03-03 19:13:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600523', 'tblTempUsageDetail_20' ) end [2025-03-03 19:13:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:13:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:13:22] Production.INFO: ==20888== Releasing lock... [2025-03-03 19:13:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:13:22] Production.INFO: 50 MB #Memory Used# [2025-03-03 19:14:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:14:06 [end_date_ymd] => 2025-03-03 19:14:06 [RateCDR] => 1 ) [2025-03-03 19: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-03 16:14:06' and `end` < '2025-03-03 19: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-03 19:14:18] Production.INFO: count ==2918 [2025-03-03 19:14:19] Production.ERROR: pbx CDR StartTime 2025-03-03 16:14:06 - End Time 2025-03-03 19:14:06 [2025-03-03 19:14:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:14:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600528', 'tblTempUsageDetail_20' ) start [2025-03-03 19:14:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600528', 'tblTempUsageDetail_20' ) end [2025-03-03 19:14:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600528', 'tblTempVendorCDR_20' ) start [2025-03-03 19:14:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600528', 'tblTempVendorCDR_20' ) end [2025-03-03 19:14:19] Production.INFO: ProcessCDR(1,14600528,1,1,2) [2025-03-03 19:14:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600528,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:14:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600528,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:14:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600528,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:14:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600528,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:14:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600528', 'tblTempUsageDetail_20' ) start [2025-03-03 19:14:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600528', 'tblTempUsageDetail_20' ) end [2025-03-03 19:14:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:14:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:14:23] Production.INFO: ==20962== Releasing lock... [2025-03-03 19:14:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:14:23] Production.INFO: 50 MB #Memory Used# [2025-03-03 19:15:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:15:05 [end_date_ymd] => 2025-03-03 19:15:05 [RateCDR] => 1 ) [2025-03-03 19:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 16:15:05' and `end` < '2025-03-03 19:15:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 19:15:17] Production.INFO: count ==2902 [2025-03-03 19:15:18] Production.ERROR: pbx CDR StartTime 2025-03-03 16:15:05 - End Time 2025-03-03 19:15:05 [2025-03-03 19:15:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600533', 'tblTempUsageDetail_20' ) start [2025-03-03 19:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600533', 'tblTempUsageDetail_20' ) end [2025-03-03 19:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600533', 'tblTempVendorCDR_20' ) start [2025-03-03 19:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600533', 'tblTempVendorCDR_20' ) end [2025-03-03 19:15:18] Production.INFO: ProcessCDR(1,14600533,1,1,2) [2025-03-03 19:15:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600533,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:15:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600533,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:15:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600533,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:15:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600533,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:15:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600533', 'tblTempUsageDetail_20' ) start [2025-03-03 19:15:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600533', 'tblTempUsageDetail_20' ) end [2025-03-03 19:15:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:15:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:15:23] Production.INFO: ==21115== Releasing lock... [2025-03-03 19:15:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:15:23] Production.INFO: 50.25 MB #Memory Used# [2025-03-03 19:16:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:16:05 [end_date_ymd] => 2025-03-03 19:16:05 [RateCDR] => 1 ) [2025-03-03 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-03 16:16:05' and `end` < '2025-03-03 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-03 19:16:18] Production.INFO: count ==2895 [2025-03-03 19:16:18] Production.ERROR: pbx CDR StartTime 2025-03-03 16:16:05 - End Time 2025-03-03 19:16:05 [2025-03-03 19:16:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600538', 'tblTempUsageDetail_20' ) start [2025-03-03 19:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600538', 'tblTempUsageDetail_20' ) end [2025-03-03 19:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600538', 'tblTempVendorCDR_20' ) start [2025-03-03 19:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600538', 'tblTempVendorCDR_20' ) end [2025-03-03 19:16:18] Production.INFO: ProcessCDR(1,14600538,1,1,2) [2025-03-03 19:16:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600538,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:16:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600538,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:16:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600538,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:16:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600538,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:16:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600538', 'tblTempUsageDetail_20' ) start [2025-03-03 19:16:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600538', 'tblTempUsageDetail_20' ) end [2025-03-03 19:16:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:16:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:16:22] Production.INFO: ==21189== Releasing lock... [2025-03-03 19:16:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:16:22] Production.INFO: 49.75 MB #Memory Used# [2025-03-03 19:17:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:17:05 [end_date_ymd] => 2025-03-03 19:17:05 [RateCDR] => 1 ) [2025-03-03 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-03 16:17:05' and `end` < '2025-03-03 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-03 19:17:18] Production.INFO: count ==2870 [2025-03-03 19:17:19] Production.ERROR: pbx CDR StartTime 2025-03-03 16:17:05 - End Time 2025-03-03 19:17:05 [2025-03-03 19:17:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:17:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600543', 'tblTempUsageDetail_20' ) start [2025-03-03 19:17:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600543', 'tblTempUsageDetail_20' ) end [2025-03-03 19:17:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600543', 'tblTempVendorCDR_20' ) start [2025-03-03 19:17:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600543', 'tblTempVendorCDR_20' ) end [2025-03-03 19:17:19] Production.INFO: ProcessCDR(1,14600543,1,1,2) [2025-03-03 19:17:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600543,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:17:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600543,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:17:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600543,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:17:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600543,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:17:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600543', 'tblTempUsageDetail_20' ) start [2025-03-03 19:17:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600543', 'tblTempUsageDetail_20' ) end [2025-03-03 19:17:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:17:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:17:22] Production.INFO: ==21263== Releasing lock... [2025-03-03 19:17:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:17:22] Production.INFO: 49.5 MB #Memory Used# [2025-03-03 19:18:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:18:05 [end_date_ymd] => 2025-03-03 19:18:05 [RateCDR] => 1 ) [2025-03-03 19:18:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 16:18:05' and `end` < '2025-03-03 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-03 19:18:18] Production.INFO: count ==2869 [2025-03-03 19:18:19] Production.ERROR: pbx CDR StartTime 2025-03-03 16:18:05 - End Time 2025-03-03 19:18:05 [2025-03-03 19:18:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:18:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600548', 'tblTempUsageDetail_20' ) start [2025-03-03 19:18:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600548', 'tblTempUsageDetail_20' ) end [2025-03-03 19:18:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600548', 'tblTempVendorCDR_20' ) start [2025-03-03 19:18:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600548', 'tblTempVendorCDR_20' ) end [2025-03-03 19:18:19] Production.INFO: ProcessCDR(1,14600548,1,1,2) [2025-03-03 19:18:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600548,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:18:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600548,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:18:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600548,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:18:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600548,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:18:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600548', 'tblTempUsageDetail_20' ) start [2025-03-03 19:18:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600548', 'tblTempUsageDetail_20' ) end [2025-03-03 19:18:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:18:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:18:22] Production.INFO: ==21334== Releasing lock... [2025-03-03 19:18:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:18:22] Production.INFO: 49.75 MB #Memory Used# [2025-03-03 19:19:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:19:06 [end_date_ymd] => 2025-03-03 19:19:06 [RateCDR] => 1 ) [2025-03-03 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-03 16:19:06' and `end` < '2025-03-03 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-03 19:19:18] Production.INFO: count ==2852 [2025-03-03 19:19:19] Production.ERROR: pbx CDR StartTime 2025-03-03 16:19:06 - End Time 2025-03-03 19:19:06 [2025-03-03 19:19:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:19:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600553', 'tblTempUsageDetail_20' ) start [2025-03-03 19:19:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600553', 'tblTempUsageDetail_20' ) end [2025-03-03 19:19:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600553', 'tblTempVendorCDR_20' ) start [2025-03-03 19:19:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600553', 'tblTempVendorCDR_20' ) end [2025-03-03 19:19:19] Production.INFO: ProcessCDR(1,14600553,1,1,2) [2025-03-03 19:19:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600553,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:19:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600553,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:19:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600553,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:19:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600553,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:19:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600553', 'tblTempUsageDetail_20' ) start [2025-03-03 19:19:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600553', 'tblTempUsageDetail_20' ) end [2025-03-03 19:19:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:19:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:19:22] Production.INFO: ==21413== Releasing lock... [2025-03-03 19:19:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:19:22] Production.INFO: 49.5 MB #Memory Used# [2025-03-03 19:20:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:20:06 [end_date_ymd] => 2025-03-03 19:20:06 [RateCDR] => 1 ) [2025-03-03 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-03 16:20:06' and `end` < '2025-03-03 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-03 19:20:18] Production.INFO: count ==2849 [2025-03-03 19:20:19] Production.ERROR: pbx CDR StartTime 2025-03-03 16:20:06 - End Time 2025-03-03 19:20:06 [2025-03-03 19:20:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:20:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600559', 'tblTempUsageDetail_20' ) start [2025-03-03 19:20:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600559', 'tblTempUsageDetail_20' ) end [2025-03-03 19:20:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600559', 'tblTempVendorCDR_20' ) start [2025-03-03 19:20:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600559', 'tblTempVendorCDR_20' ) end [2025-03-03 19:20:19] Production.INFO: ProcessCDR(1,14600559,1,1,2) [2025-03-03 19:20:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600559,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:20:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600559,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:20:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600559,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:20:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600559,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:20:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600559', 'tblTempUsageDetail_20' ) start [2025-03-03 19:20:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600559', 'tblTempUsageDetail_20' ) end [2025-03-03 19:20:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:20:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:20:24] Production.INFO: ==21488== Releasing lock... [2025-03-03 19:20:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:20:24] Production.INFO: 49.5 MB #Memory Used# [2025-03-03 19:21:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:21:05 [end_date_ymd] => 2025-03-03 19:21:05 [RateCDR] => 1 ) [2025-03-03 19:21:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 16:21:05' and `end` < '2025-03-03 19:21:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 19:21:18] Production.INFO: count ==2806 [2025-03-03 19:21:19] Production.ERROR: pbx CDR StartTime 2025-03-03 16:21:05 - End Time 2025-03-03 19:21:05 [2025-03-03 19:21:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:21:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600564', 'tblTempUsageDetail_20' ) start [2025-03-03 19:21:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600564', 'tblTempUsageDetail_20' ) end [2025-03-03 19:21:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600564', 'tblTempVendorCDR_20' ) start [2025-03-03 19:21:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600564', 'tblTempVendorCDR_20' ) end [2025-03-03 19:21:19] Production.INFO: ProcessCDR(1,14600564,1,1,2) [2025-03-03 19:21:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600564,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:21:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600564,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:21:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600564,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:21:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600564,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:21:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600564', 'tblTempUsageDetail_20' ) start [2025-03-03 19:21:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600564', 'tblTempUsageDetail_20' ) end [2025-03-03 19:21:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:21:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:21:23] Production.INFO: ==21563== Releasing lock... [2025-03-03 19:21:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:21:23] Production.INFO: 49.25 MB #Memory Used# [2025-03-03 19:22:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:22:05 [end_date_ymd] => 2025-03-03 19:22:05 [RateCDR] => 1 ) [2025-03-03 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-03 16:22:05' and `end` < '2025-03-03 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-03 19:22:18] Production.INFO: count ==2787 [2025-03-03 19:22:19] Production.ERROR: pbx CDR StartTime 2025-03-03 16:22:05 - End Time 2025-03-03 19:22:05 [2025-03-03 19:22:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:22:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600569', 'tblTempUsageDetail_20' ) start [2025-03-03 19:22:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600569', 'tblTempUsageDetail_20' ) end [2025-03-03 19:22:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600569', 'tblTempVendorCDR_20' ) start [2025-03-03 19:22:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600569', 'tblTempVendorCDR_20' ) end [2025-03-03 19:22:19] Production.INFO: ProcessCDR(1,14600569,1,1,2) [2025-03-03 19:22:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600569,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:22:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600569,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:22:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600569,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:22:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600569,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:22:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600569', 'tblTempUsageDetail_20' ) start [2025-03-03 19:22:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600569', 'tblTempUsageDetail_20' ) end [2025-03-03 19:22:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:22:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:22:22] Production.INFO: ==21639== Releasing lock... [2025-03-03 19:22:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:22:22] Production.INFO: 49 MB #Memory Used# [2025-03-03 19:23:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:23:06 [end_date_ymd] => 2025-03-03 19:23:06 [RateCDR] => 1 ) [2025-03-03 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-03 16:23:06' and `end` < '2025-03-03 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-03 19:23:18] Production.INFO: count ==2771 [2025-03-03 19:23:19] Production.ERROR: pbx CDR StartTime 2025-03-03 16:23:06 - End Time 2025-03-03 19:23:06 [2025-03-03 19:23:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:23:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600574', 'tblTempUsageDetail_20' ) start [2025-03-03 19:23:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600574', 'tblTempUsageDetail_20' ) end [2025-03-03 19:23:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600574', 'tblTempVendorCDR_20' ) start [2025-03-03 19:23:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600574', 'tblTempVendorCDR_20' ) end [2025-03-03 19:23:19] Production.INFO: ProcessCDR(1,14600574,1,1,2) [2025-03-03 19:23:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600574,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:23:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600574,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:23:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600574,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:23:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600574,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:23:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600574', 'tblTempUsageDetail_20' ) start [2025-03-03 19:23:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600574', 'tblTempUsageDetail_20' ) end [2025-03-03 19:23:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:23:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:23:22] Production.INFO: ==21712== Releasing lock... [2025-03-03 19:23:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:23:22] Production.INFO: 49 MB #Memory Used# [2025-03-03 19:24:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:24:05 [end_date_ymd] => 2025-03-03 19:24:05 [RateCDR] => 1 ) [2025-03-03 19:24:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 16:24:05' and `end` < '2025-03-03 19:24:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 19:24:17] Production.INFO: count ==2757 [2025-03-03 19:24:18] Production.ERROR: pbx CDR StartTime 2025-03-03 16:24:05 - End Time 2025-03-03 19:24:05 [2025-03-03 19:24:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600579', 'tblTempUsageDetail_20' ) start [2025-03-03 19:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600579', 'tblTempUsageDetail_20' ) end [2025-03-03 19:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600579', 'tblTempVendorCDR_20' ) start [2025-03-03 19:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600579', 'tblTempVendorCDR_20' ) end [2025-03-03 19:24:18] Production.INFO: ProcessCDR(1,14600579,1,1,2) [2025-03-03 19:24:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600579,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:24:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600579,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:24:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600579,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:24:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600579,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600579', 'tblTempUsageDetail_20' ) start [2025-03-03 19:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600579', 'tblTempUsageDetail_20' ) end [2025-03-03 19:24:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:24:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:24:21] Production.INFO: ==21794== Releasing lock... [2025-03-03 19:24:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:24:21] Production.INFO: 48.75 MB #Memory Used# [2025-03-03 19:25:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:25:05 [end_date_ymd] => 2025-03-03 19:25:05 [RateCDR] => 1 ) [2025-03-03 19:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 16:25:05' and `end` < '2025-03-03 19:25:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 19:25:18] Production.INFO: count ==2743 [2025-03-03 19:25:18] Production.ERROR: pbx CDR StartTime 2025-03-03 16:25:05 - End Time 2025-03-03 19:25:05 [2025-03-03 19:25:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600584', 'tblTempUsageDetail_20' ) start [2025-03-03 19:25:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600584', 'tblTempUsageDetail_20' ) end [2025-03-03 19:25:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600584', 'tblTempVendorCDR_20' ) start [2025-03-03 19:25:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600584', 'tblTempVendorCDR_20' ) end [2025-03-03 19:25:19] Production.INFO: ProcessCDR(1,14600584,1,1,2) [2025-03-03 19:25:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600584,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:25:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600584,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:25:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600584,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:25:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600584,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:25:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600584', 'tblTempUsageDetail_20' ) start [2025-03-03 19:25:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600584', 'tblTempUsageDetail_20' ) end [2025-03-03 19:25:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:25:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:25:22] Production.INFO: ==21911== Releasing lock... [2025-03-03 19:25:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:25:22] Production.INFO: 48.75 MB #Memory Used# [2025-03-03 19:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:26:05 [end_date_ymd] => 2025-03-03 19:26:05 [RateCDR] => 1 ) [2025-03-03 19:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 16:26:05' and `end` < '2025-03-03 19:26:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 19:26:17] Production.INFO: count ==2732 [2025-03-03 19:26:18] Production.ERROR: pbx CDR StartTime 2025-03-03 16:26:05 - End Time 2025-03-03 19:26:05 [2025-03-03 19:26:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600589', 'tblTempUsageDetail_20' ) start [2025-03-03 19:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600589', 'tblTempUsageDetail_20' ) end [2025-03-03 19:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600589', 'tblTempVendorCDR_20' ) start [2025-03-03 19:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600589', 'tblTempVendorCDR_20' ) end [2025-03-03 19:26:18] Production.INFO: ProcessCDR(1,14600589,1,1,2) [2025-03-03 19:26:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600589,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:26:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600589,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:26:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600589,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:26:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600589,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:26:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600589', 'tblTempUsageDetail_20' ) start [2025-03-03 19:26:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600589', 'tblTempUsageDetail_20' ) end [2025-03-03 19:26:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:26:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:26:22] Production.INFO: ==21984== Releasing lock... [2025-03-03 19:26:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:26:22] Production.INFO: 48.5 MB #Memory Used# [2025-03-03 19:27:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:27:05 [end_date_ymd] => 2025-03-03 19:27:05 [RateCDR] => 1 ) [2025-03-03 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-03 16:27:05' and `end` < '2025-03-03 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-03 19:27:18] Production.INFO: count ==2727 [2025-03-03 19:27:19] Production.ERROR: pbx CDR StartTime 2025-03-03 16:27:05 - End Time 2025-03-03 19:27:05 [2025-03-03 19:27:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:27:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600594', 'tblTempUsageDetail_20' ) start [2025-03-03 19:27:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600594', 'tblTempUsageDetail_20' ) end [2025-03-03 19:27:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600594', 'tblTempVendorCDR_20' ) start [2025-03-03 19:27:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600594', 'tblTempVendorCDR_20' ) end [2025-03-03 19:27:19] Production.INFO: ProcessCDR(1,14600594,1,1,2) [2025-03-03 19:27:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600594,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:27:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600594,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:27:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600594,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:27:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600594,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:27:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600594', 'tblTempUsageDetail_20' ) start [2025-03-03 19:27:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600594', 'tblTempUsageDetail_20' ) end [2025-03-03 19:27:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:27:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:27:23] Production.INFO: ==22064== Releasing lock... [2025-03-03 19:27:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:27:23] Production.INFO: 48.5 MB #Memory Used# [2025-03-03 19:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:28:05 [end_date_ymd] => 2025-03-03 19:28:05 [RateCDR] => 1 ) [2025-03-03 19:28:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 16:28:05' and `end` < '2025-03-03 19:28:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 19:28:17] Production.INFO: count ==2726 [2025-03-03 19:28:18] Production.ERROR: pbx CDR StartTime 2025-03-03 16:28:05 - End Time 2025-03-03 19:28:05 [2025-03-03 19:28:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600599', 'tblTempUsageDetail_20' ) start [2025-03-03 19:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600599', 'tblTempUsageDetail_20' ) end [2025-03-03 19:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600599', 'tblTempVendorCDR_20' ) start [2025-03-03 19:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600599', 'tblTempVendorCDR_20' ) end [2025-03-03 19:28:18] Production.INFO: ProcessCDR(1,14600599,1,1,2) [2025-03-03 19:28:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600599,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:28:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600599,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:28:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600599,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:28:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600599,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:28:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600599', 'tblTempUsageDetail_20' ) start [2025-03-03 19:28:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600599', 'tblTempUsageDetail_20' ) end [2025-03-03 19:28:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:28:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:28:24] Production.INFO: ==22140== Releasing lock... [2025-03-03 19:28:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:28:24] Production.INFO: 48.75 MB #Memory Used# [2025-03-03 19:29:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:29:05 [end_date_ymd] => 2025-03-03 19:29:05 [RateCDR] => 1 ) [2025-03-03 19: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-03 16:29:05' and `end` < '2025-03-03 19: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-03 19:29:18] Production.INFO: count ==2710 [2025-03-03 19:29:19] Production.ERROR: pbx CDR StartTime 2025-03-03 16:29:05 - End Time 2025-03-03 19:29:05 [2025-03-03 19:29:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:29:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600604', 'tblTempUsageDetail_20' ) start [2025-03-03 19:29:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600604', 'tblTempUsageDetail_20' ) end [2025-03-03 19:29:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600604', 'tblTempVendorCDR_20' ) start [2025-03-03 19:29:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600604', 'tblTempVendorCDR_20' ) end [2025-03-03 19:29:19] Production.INFO: ProcessCDR(1,14600604,1,1,2) [2025-03-03 19:29:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600604,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:29:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600604,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:29:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600604,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:29:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600604,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:29:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600604', 'tblTempUsageDetail_20' ) start [2025-03-03 19:29:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600604', 'tblTempUsageDetail_20' ) end [2025-03-03 19:29:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:29:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:29:23] Production.INFO: ==22214== Releasing lock... [2025-03-03 19:29:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:29:23] Production.INFO: 48.5 MB #Memory Used# [2025-03-03 19:30:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:30:06 [end_date_ymd] => 2025-03-03 19:30:06 [RateCDR] => 1 ) [2025-03-03 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-03 16:30:06' and `end` < '2025-03-03 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-03 19:30:19] Production.INFO: count ==2703 [2025-03-03 19:30:20] Production.ERROR: pbx CDR StartTime 2025-03-03 16:30:06 - End Time 2025-03-03 19:30:06 [2025-03-03 19:30:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:30:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600610', 'tblTempUsageDetail_20' ) start [2025-03-03 19:30:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600610', 'tblTempUsageDetail_20' ) end [2025-03-03 19:30:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600610', 'tblTempVendorCDR_20' ) start [2025-03-03 19:30:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600610', 'tblTempVendorCDR_20' ) end [2025-03-03 19:30:20] Production.INFO: ProcessCDR(1,14600610,1,1,2) [2025-03-03 19:30:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600610,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:30:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600610,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:30:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600610,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:30:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600610,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:30:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600610', 'tblTempUsageDetail_20' ) start [2025-03-03 19:30:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600610', 'tblTempUsageDetail_20' ) end [2025-03-03 19:30:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:30:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:30:23] Production.INFO: ==22292== Releasing lock... [2025-03-03 19:30:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:30:23] Production.INFO: 48.25 MB #Memory Used# [2025-03-03 19:31:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:31:06 [end_date_ymd] => 2025-03-03 19:31:06 [RateCDR] => 1 ) [2025-03-03 19: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-03 16:31:06' and `end` < '2025-03-03 19: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-03 19:31:18] Production.INFO: count ==2633 [2025-03-03 19:31:19] Production.ERROR: pbx CDR StartTime 2025-03-03 16:31:06 - End Time 2025-03-03 19:31:06 [2025-03-03 19:31:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:31:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600615', 'tblTempUsageDetail_20' ) start [2025-03-03 19:31:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600615', 'tblTempUsageDetail_20' ) end [2025-03-03 19:31:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600615', 'tblTempVendorCDR_20' ) start [2025-03-03 19:31:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600615', 'tblTempVendorCDR_20' ) end [2025-03-03 19:31:19] Production.INFO: ProcessCDR(1,14600615,1,1,2) [2025-03-03 19:31:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600615,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:31:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600615,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:31:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600615,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:31:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600615,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:31:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600615', 'tblTempUsageDetail_20' ) start [2025-03-03 19:31:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600615', 'tblTempUsageDetail_20' ) end [2025-03-03 19:31:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:31:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:31:23] Production.INFO: ==22371== Releasing lock... [2025-03-03 19:31:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:31:23] Production.INFO: 47.75 MB #Memory Used# [2025-03-03 19:32:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:32:06 [end_date_ymd] => 2025-03-03 19:32:06 [RateCDR] => 1 ) [2025-03-03 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-03 16:32:06' and `end` < '2025-03-03 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-03 19:32:18] Production.INFO: count ==2614 [2025-03-03 19:32:19] Production.ERROR: pbx CDR StartTime 2025-03-03 16:32:06 - End Time 2025-03-03 19:32:06 [2025-03-03 19:32:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:32:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600620', 'tblTempUsageDetail_20' ) start [2025-03-03 19:32:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600620', 'tblTempUsageDetail_20' ) end [2025-03-03 19:32:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600620', 'tblTempVendorCDR_20' ) start [2025-03-03 19:32:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600620', 'tblTempVendorCDR_20' ) end [2025-03-03 19:32:19] Production.INFO: ProcessCDR(1,14600620,1,1,2) [2025-03-03 19:32:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600620,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:32:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600620,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:32:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600620,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:32:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600620,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:32:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600620', 'tblTempUsageDetail_20' ) start [2025-03-03 19:32:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600620', 'tblTempUsageDetail_20' ) end [2025-03-03 19:32:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:32:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:32:23] Production.INFO: ==22448== Releasing lock... [2025-03-03 19:32:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:32:23] Production.INFO: 47.75 MB #Memory Used# [2025-03-03 19:33:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:33:05 [end_date_ymd] => 2025-03-03 19:33:05 [RateCDR] => 1 ) [2025-03-03 19: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-03 16:33:05' and `end` < '2025-03-03 19: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-03 19:33:17] Production.INFO: count ==2586 [2025-03-03 19:33:18] Production.ERROR: pbx CDR StartTime 2025-03-03 16:33:05 - End Time 2025-03-03 19:33:05 [2025-03-03 19:33:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600625', 'tblTempUsageDetail_20' ) start [2025-03-03 19:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600625', 'tblTempUsageDetail_20' ) end [2025-03-03 19:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600625', 'tblTempVendorCDR_20' ) start [2025-03-03 19:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600625', 'tblTempVendorCDR_20' ) end [2025-03-03 19:33:18] Production.INFO: ProcessCDR(1,14600625,1,1,2) [2025-03-03 19:33:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600625,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:33:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600625,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:33:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600625,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:33:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600625,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:33:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600625', 'tblTempUsageDetail_20' ) start [2025-03-03 19:33:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600625', 'tblTempUsageDetail_20' ) end [2025-03-03 19:33:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:33:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:33:23] Production.INFO: ==22523== Releasing lock... [2025-03-03 19:33:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:33:23] Production.INFO: 47.5 MB #Memory Used# [2025-03-03 19:34:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:34:06 [end_date_ymd] => 2025-03-03 19:34:06 [RateCDR] => 1 ) [2025-03-03 19: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-03 16:34:06' and `end` < '2025-03-03 19: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-03 19:34:18] Production.INFO: count ==2578 [2025-03-03 19:34:19] Production.ERROR: pbx CDR StartTime 2025-03-03 16:34:06 - End Time 2025-03-03 19:34:06 [2025-03-03 19:34:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:34:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600630', 'tblTempUsageDetail_20' ) start [2025-03-03 19:34:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600630', 'tblTempUsageDetail_20' ) end [2025-03-03 19:34:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600630', 'tblTempVendorCDR_20' ) start [2025-03-03 19:34:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600630', 'tblTempVendorCDR_20' ) end [2025-03-03 19:34:19] Production.INFO: ProcessCDR(1,14600630,1,1,2) [2025-03-03 19:34:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600630,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:34:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600630,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:34:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600630,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:34:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600630,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:34:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600630', 'tblTempUsageDetail_20' ) start [2025-03-03 19:34:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600630', 'tblTempUsageDetail_20' ) end [2025-03-03 19:34:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:34:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:34:25] Production.INFO: ==22598== Releasing lock... [2025-03-03 19:34:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:34:25] Production.INFO: 47.5 MB #Memory Used# [2025-03-03 19:35:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:35:05 [end_date_ymd] => 2025-03-03 19:35:05 [RateCDR] => 1 ) [2025-03-03 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-03 16:35:05' and `end` < '2025-03-03 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-03 19:35:18] Production.INFO: count ==2576 [2025-03-03 19:35:18] Production.ERROR: pbx CDR StartTime 2025-03-03 16:35:05 - End Time 2025-03-03 19:35:05 [2025-03-03 19:35:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600635', 'tblTempUsageDetail_20' ) start [2025-03-03 19:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600635', 'tblTempUsageDetail_20' ) end [2025-03-03 19:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600635', 'tblTempVendorCDR_20' ) start [2025-03-03 19:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600635', 'tblTempVendorCDR_20' ) end [2025-03-03 19:35:18] Production.INFO: ProcessCDR(1,14600635,1,1,2) [2025-03-03 19:35:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600635,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:35:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600635,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:35:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600635,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:35:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600635,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:35:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600635', 'tblTempUsageDetail_20' ) start [2025-03-03 19:35:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600635', 'tblTempUsageDetail_20' ) end [2025-03-03 19:35:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:35:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:35:24] Production.INFO: ==22674== Releasing lock... [2025-03-03 19:35:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:35:24] Production.INFO: 47.5 MB #Memory Used# [2025-03-03 19:36:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:36:06 [end_date_ymd] => 2025-03-03 19:36:06 [RateCDR] => 1 ) [2025-03-03 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-03 16:36:06' and `end` < '2025-03-03 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-03 19:36:18] Production.INFO: count ==2577 [2025-03-03 19:36:19] Production.ERROR: pbx CDR StartTime 2025-03-03 16:36:06 - End Time 2025-03-03 19:36:06 [2025-03-03 19:36:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:36:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600640', 'tblTempUsageDetail_20' ) start [2025-03-03 19:36:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600640', 'tblTempUsageDetail_20' ) end [2025-03-03 19:36:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600640', 'tblTempVendorCDR_20' ) start [2025-03-03 19:36:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600640', 'tblTempVendorCDR_20' ) end [2025-03-03 19:36:19] Production.INFO: ProcessCDR(1,14600640,1,1,2) [2025-03-03 19:36:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600640,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:36:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600640,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:36:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600640,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:36:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600640,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:36:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600640', 'tblTempUsageDetail_20' ) start [2025-03-03 19:36:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600640', 'tblTempUsageDetail_20' ) end [2025-03-03 19:36:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:36:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:36:23] Production.INFO: ==22747== Releasing lock... [2025-03-03 19:36:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:36:23] Production.INFO: 47.5 MB #Memory Used# [2025-03-03 19:37:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:37:05 [end_date_ymd] => 2025-03-03 19:37:05 [RateCDR] => 1 ) [2025-03-03 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-03 16:37:05' and `end` < '2025-03-03 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-03 19:37:17] Production.INFO: count ==2579 [2025-03-03 19:37:18] Production.ERROR: pbx CDR StartTime 2025-03-03 16:37:05 - End Time 2025-03-03 19:37:05 [2025-03-03 19:37:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600645', 'tblTempUsageDetail_20' ) start [2025-03-03 19:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600645', 'tblTempUsageDetail_20' ) end [2025-03-03 19:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600645', 'tblTempVendorCDR_20' ) start [2025-03-03 19:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600645', 'tblTempVendorCDR_20' ) end [2025-03-03 19:37:18] Production.INFO: ProcessCDR(1,14600645,1,1,2) [2025-03-03 19:37:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600645,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:37:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600645,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:37:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600645,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:37:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600645,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:37:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600645', 'tblTempUsageDetail_20' ) start [2025-03-03 19:37:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600645', 'tblTempUsageDetail_20' ) end [2025-03-03 19:37:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:37:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:37:23] Production.INFO: ==22822== Releasing lock... [2025-03-03 19:37:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:37:23] Production.INFO: 47.5 MB #Memory Used# [2025-03-03 19:38:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:38:05 [end_date_ymd] => 2025-03-03 19:38:05 [RateCDR] => 1 ) [2025-03-03 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-03 16:38:05' and `end` < '2025-03-03 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-03 19:38:18] Production.INFO: count ==2565 [2025-03-03 19:38:18] Production.ERROR: pbx CDR StartTime 2025-03-03 16:38:05 - End Time 2025-03-03 19:38:05 [2025-03-03 19:38:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600650', 'tblTempUsageDetail_20' ) start [2025-03-03 19:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600650', 'tblTempUsageDetail_20' ) end [2025-03-03 19:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600650', 'tblTempVendorCDR_20' ) start [2025-03-03 19:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600650', 'tblTempVendorCDR_20' ) end [2025-03-03 19:38:18] Production.INFO: ProcessCDR(1,14600650,1,1,2) [2025-03-03 19:38:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600650,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:38:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600650,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:38:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600650,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:38:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600650,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:38:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600650', 'tblTempUsageDetail_20' ) start [2025-03-03 19:38:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600650', 'tblTempUsageDetail_20' ) end [2025-03-03 19:38:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:38:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:38:22] Production.INFO: ==22900== Releasing lock... [2025-03-03 19:38:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:38:22] Production.INFO: 47.25 MB #Memory Used# [2025-03-03 19:39:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:39:05 [end_date_ymd] => 2025-03-03 19:39:05 [RateCDR] => 1 ) [2025-03-03 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-03 16:39:05' and `end` < '2025-03-03 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-03 19:39:17] Production.INFO: count ==2547 [2025-03-03 19:39:18] Production.ERROR: pbx CDR StartTime 2025-03-03 16:39:05 - End Time 2025-03-03 19:39:05 [2025-03-03 19:39:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600655', 'tblTempUsageDetail_20' ) start [2025-03-03 19:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600655', 'tblTempUsageDetail_20' ) end [2025-03-03 19:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600655', 'tblTempVendorCDR_20' ) start [2025-03-03 19:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600655', 'tblTempVendorCDR_20' ) end [2025-03-03 19:39:18] Production.INFO: ProcessCDR(1,14600655,1,1,2) [2025-03-03 19:39:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600655,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:39:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600655,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:39:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600655,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:39:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600655,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:39:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600655', 'tblTempUsageDetail_20' ) start [2025-03-03 19:39:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600655', 'tblTempUsageDetail_20' ) end [2025-03-03 19:39:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:39:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:39:21] Production.INFO: ==22973== Releasing lock... [2025-03-03 19:39:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:39:21] Production.INFO: 47.25 MB #Memory Used# [2025-03-03 19:40:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:40:06 [end_date_ymd] => 2025-03-03 19:40:06 [RateCDR] => 1 ) [2025-03-03 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-03 16:40:06' and `end` < '2025-03-03 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-03 19:40:19] Production.INFO: count ==2533 [2025-03-03 19:40:19] Production.ERROR: pbx CDR StartTime 2025-03-03 16:40:06 - End Time 2025-03-03 19:40:06 [2025-03-03 19:40:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600661', 'tblTempUsageDetail_20' ) start [2025-03-03 19:40:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600661', 'tblTempUsageDetail_20' ) end [2025-03-03 19:40:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600661', 'tblTempVendorCDR_20' ) start [2025-03-03 19:40:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600661', 'tblTempVendorCDR_20' ) end [2025-03-03 19:40:20] Production.INFO: ProcessCDR(1,14600661,1,1,2) [2025-03-03 19:40:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600661,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:40:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600661,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:40:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600661,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:40:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600661,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:40:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600661', 'tblTempUsageDetail_20' ) start [2025-03-03 19:40:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600661', 'tblTempUsageDetail_20' ) end [2025-03-03 19:40:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:40:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:40:24] Production.INFO: ==23090== Releasing lock... [2025-03-03 19:40:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:40:24] Production.INFO: 47 MB #Memory Used# [2025-03-03 19:41:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:41:04 [end_date_ymd] => 2025-03-03 19:41:04 [RateCDR] => 1 ) [2025-03-03 19:41:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 16:41:04' and `end` < '2025-03-03 19:41:04' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 19:41:17] Production.INFO: count ==2440 [2025-03-03 19:41:17] Production.ERROR: pbx CDR StartTime 2025-03-03 16:41:04 - End Time 2025-03-03 19:41:04 [2025-03-03 19:41:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600666', 'tblTempUsageDetail_20' ) start [2025-03-03 19:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600666', 'tblTempUsageDetail_20' ) end [2025-03-03 19:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600666', 'tblTempVendorCDR_20' ) start [2025-03-03 19:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600666', 'tblTempVendorCDR_20' ) end [2025-03-03 19:41:18] Production.INFO: ProcessCDR(1,14600666,1,1,2) [2025-03-03 19:41:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600666,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:41:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600666,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:41:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600666,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:41:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600666,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:41:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600666', 'tblTempUsageDetail_20' ) start [2025-03-03 19:41:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600666', 'tblTempUsageDetail_20' ) end [2025-03-03 19:41:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:41:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:41:22] Production.INFO: ==23163== Releasing lock... [2025-03-03 19:41:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:41:22] Production.INFO: 46.5 MB #Memory Used# [2025-03-03 19:42:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:42:05 [end_date_ymd] => 2025-03-03 19:42:05 [RateCDR] => 1 ) [2025-03-03 19:42:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 16:42:05' and `end` < '2025-03-03 19:42:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 19:42:18] Production.INFO: count ==2426 [2025-03-03 19:42:18] Production.ERROR: pbx CDR StartTime 2025-03-03 16:42:05 - End Time 2025-03-03 19:42:05 [2025-03-03 19:42:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600671', 'tblTempUsageDetail_20' ) start [2025-03-03 19:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600671', 'tblTempUsageDetail_20' ) end [2025-03-03 19:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600671', 'tblTempVendorCDR_20' ) start [2025-03-03 19:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600671', 'tblTempVendorCDR_20' ) end [2025-03-03 19:42:18] Production.INFO: ProcessCDR(1,14600671,1,1,2) [2025-03-03 19:42:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600671,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:42:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600671,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:42:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600671,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:42:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600671,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:42:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600671', 'tblTempUsageDetail_20' ) start [2025-03-03 19:42:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600671', 'tblTempUsageDetail_20' ) end [2025-03-03 19:42:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:42:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:42:22] Production.INFO: ==23233== Releasing lock... [2025-03-03 19:42:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:42:22] Production.INFO: 46.25 MB #Memory Used# [2025-03-03 19:43:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:43:05 [end_date_ymd] => 2025-03-03 19:43:05 [RateCDR] => 1 ) [2025-03-03 19: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-03 16:43:05' and `end` < '2025-03-03 19: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-03 19:43:17] Production.INFO: count ==2401 [2025-03-03 19:43:18] Production.ERROR: pbx CDR StartTime 2025-03-03 16:43:05 - End Time 2025-03-03 19:43:05 [2025-03-03 19:43:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600676', 'tblTempUsageDetail_20' ) start [2025-03-03 19:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600676', 'tblTempUsageDetail_20' ) end [2025-03-03 19:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600676', 'tblTempVendorCDR_20' ) start [2025-03-03 19:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600676', 'tblTempVendorCDR_20' ) end [2025-03-03 19:43:18] Production.INFO: ProcessCDR(1,14600676,1,1,2) [2025-03-03 19:43:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600676,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:43:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600676,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:43:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600676,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:43:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600676,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:43:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600676', 'tblTempUsageDetail_20' ) start [2025-03-03 19:43:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600676', 'tblTempUsageDetail_20' ) end [2025-03-03 19:43:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:43:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:43:22] Production.INFO: ==23304== Releasing lock... [2025-03-03 19:43:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:43:22] Production.INFO: 46 MB #Memory Used# [2025-03-03 19:44:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:44:06 [end_date_ymd] => 2025-03-03 19:44:06 [RateCDR] => 1 ) [2025-03-03 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-03 16:44:06' and `end` < '2025-03-03 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-03 19:44:18] Production.INFO: count ==2378 [2025-03-03 19:44:19] Production.ERROR: pbx CDR StartTime 2025-03-03 16:44:06 - End Time 2025-03-03 19:44:06 [2025-03-03 19:44:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:44:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600681', 'tblTempUsageDetail_20' ) start [2025-03-03 19:44:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600681', 'tblTempUsageDetail_20' ) end [2025-03-03 19:44:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600681', 'tblTempVendorCDR_20' ) start [2025-03-03 19:44:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600681', 'tblTempVendorCDR_20' ) end [2025-03-03 19:44:19] Production.INFO: ProcessCDR(1,14600681,1,1,2) [2025-03-03 19:44:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600681,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:44:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600681,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:44:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600681,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:44:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600681,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:44:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600681', 'tblTempUsageDetail_20' ) start [2025-03-03 19:44:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600681', 'tblTempUsageDetail_20' ) end [2025-03-03 19:44:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:44:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:44:22] Production.INFO: ==23377== Releasing lock... [2025-03-03 19:44:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:44:22] Production.INFO: 46 MB #Memory Used# [2025-03-03 19:45:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:45:04 [end_date_ymd] => 2025-03-03 19:45:04 [RateCDR] => 1 ) [2025-03-03 19:45:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 16:45:04' and `end` < '2025-03-03 19:45:04' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 19:45:17] Production.INFO: count ==2361 [2025-03-03 19:45:17] Production.ERROR: pbx CDR StartTime 2025-03-03 16:45:04 - End Time 2025-03-03 19:45:04 [2025-03-03 19:45:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600685', 'tblTempUsageDetail_20' ) start [2025-03-03 19:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600685', 'tblTempUsageDetail_20' ) end [2025-03-03 19:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600685', 'tblTempVendorCDR_20' ) start [2025-03-03 19:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600685', 'tblTempVendorCDR_20' ) end [2025-03-03 19:45:17] Production.INFO: ProcessCDR(1,14600685,1,1,2) [2025-03-03 19:45:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600685,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:45:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600685,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:45:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600685,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:45:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600685,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:45:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600685', 'tblTempUsageDetail_20' ) start [2025-03-03 19:45:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600685', 'tblTempUsageDetail_20' ) end [2025-03-03 19:45:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:45:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:45:22] Production.INFO: ==23448== Releasing lock... [2025-03-03 19:45:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:45:22] Production.INFO: 45.75 MB #Memory Used# [2025-03-03 19:46:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:46:05 [end_date_ymd] => 2025-03-03 19:46:05 [RateCDR] => 1 ) [2025-03-03 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-03 16:46:05' and `end` < '2025-03-03 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-03 19:46:17] Production.INFO: count ==2361 [2025-03-03 19:46:18] Production.ERROR: pbx CDR StartTime 2025-03-03 16:46:05 - End Time 2025-03-03 19:46:05 [2025-03-03 19:46:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600691', 'tblTempUsageDetail_20' ) start [2025-03-03 19:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600691', 'tblTempUsageDetail_20' ) end [2025-03-03 19:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600691', 'tblTempVendorCDR_20' ) start [2025-03-03 19:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600691', 'tblTempVendorCDR_20' ) end [2025-03-03 19:46:18] Production.INFO: ProcessCDR(1,14600691,1,1,2) [2025-03-03 19:46:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600691,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:46:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600691,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:46:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600691,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:46:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600691,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:46:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600691', 'tblTempUsageDetail_20' ) start [2025-03-03 19:46:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600691', 'tblTempUsageDetail_20' ) end [2025-03-03 19:46:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:46:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:46:23] Production.INFO: ==23528== Releasing lock... [2025-03-03 19:46:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:46:23] Production.INFO: 45.75 MB #Memory Used# [2025-03-03 19:47:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:47:06 [end_date_ymd] => 2025-03-03 19:47:06 [RateCDR] => 1 ) [2025-03-03 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-03 16:47:06' and `end` < '2025-03-03 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-03 19:47:18] Production.INFO: count ==2356 [2025-03-03 19:47:19] Production.ERROR: pbx CDR StartTime 2025-03-03 16:47:06 - End Time 2025-03-03 19:47:06 [2025-03-03 19:47:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:47:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600696', 'tblTempUsageDetail_20' ) start [2025-03-03 19:47:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600696', 'tblTempUsageDetail_20' ) end [2025-03-03 19:47:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600696', 'tblTempVendorCDR_20' ) start [2025-03-03 19:47:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600696', 'tblTempVendorCDR_20' ) end [2025-03-03 19:47:19] Production.INFO: ProcessCDR(1,14600696,1,1,2) [2025-03-03 19:47:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600696,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:47:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600696,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:47:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600696,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:47:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600696,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:47:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600696', 'tblTempUsageDetail_20' ) start [2025-03-03 19:47:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600696', 'tblTempUsageDetail_20' ) end [2025-03-03 19:47:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:47:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:47:22] Production.INFO: ==23598== Releasing lock... [2025-03-03 19:47:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:47:22] Production.INFO: 45.75 MB #Memory Used# [2025-03-03 19:48:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:48:05 [end_date_ymd] => 2025-03-03 19:48:05 [RateCDR] => 1 ) [2025-03-03 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-03 16:48:05' and `end` < '2025-03-03 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-03 19:48:17] Production.INFO: count ==2341 [2025-03-03 19:48:18] Production.ERROR: pbx CDR StartTime 2025-03-03 16:48:05 - End Time 2025-03-03 19:48:05 [2025-03-03 19:48:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600701', 'tblTempUsageDetail_20' ) start [2025-03-03 19:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600701', 'tblTempUsageDetail_20' ) end [2025-03-03 19:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600701', 'tblTempVendorCDR_20' ) start [2025-03-03 19:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600701', 'tblTempVendorCDR_20' ) end [2025-03-03 19:48:18] Production.INFO: ProcessCDR(1,14600701,1,1,2) [2025-03-03 19:48:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600701,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:48:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600701,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:48:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600701,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:48:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600701,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:48:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600701', 'tblTempUsageDetail_20' ) start [2025-03-03 19:48:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600701', 'tblTempUsageDetail_20' ) end [2025-03-03 19:48:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:48:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:48:23] Production.INFO: ==23669== Releasing lock... [2025-03-03 19:48:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:48:23] Production.INFO: 45.75 MB #Memory Used# [2025-03-03 19:49:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:49:05 [end_date_ymd] => 2025-03-03 19:49:05 [RateCDR] => 1 ) [2025-03-03 19: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-03 16:49:05' and `end` < '2025-03-03 19: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-03 19:49:18] Production.INFO: count ==2337 [2025-03-03 19:49:18] Production.ERROR: pbx CDR StartTime 2025-03-03 16:49:05 - End Time 2025-03-03 19:49:05 [2025-03-03 19:49:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600706', 'tblTempUsageDetail_20' ) start [2025-03-03 19:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600706', 'tblTempUsageDetail_20' ) end [2025-03-03 19:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600706', 'tblTempVendorCDR_20' ) start [2025-03-03 19:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600706', 'tblTempVendorCDR_20' ) end [2025-03-03 19:49:18] Production.INFO: ProcessCDR(1,14600706,1,1,2) [2025-03-03 19:49:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600706,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:49:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600706,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:49:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600706,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:49:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600706,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:49:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600706', 'tblTempUsageDetail_20' ) start [2025-03-03 19:49:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600706', 'tblTempUsageDetail_20' ) end [2025-03-03 19:49:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:49:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:49:22] Production.INFO: ==23744== Releasing lock... [2025-03-03 19:49:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:49:22] Production.INFO: 45.5 MB #Memory Used# [2025-03-03 19:50:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:50:06 [end_date_ymd] => 2025-03-03 19:50:06 [RateCDR] => 1 ) [2025-03-03 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-03 16:50:06' and `end` < '2025-03-03 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-03 19:50:19] Production.INFO: count ==2329 [2025-03-03 19:50:19] Production.ERROR: pbx CDR StartTime 2025-03-03 16:50:06 - End Time 2025-03-03 19:50:06 [2025-03-03 19:50:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600712', 'tblTempUsageDetail_20' ) start [2025-03-03 19:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600712', 'tblTempUsageDetail_20' ) end [2025-03-03 19:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600712', 'tblTempVendorCDR_20' ) start [2025-03-03 19:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600712', 'tblTempVendorCDR_20' ) end [2025-03-03 19:50:19] Production.INFO: ProcessCDR(1,14600712,1,1,2) [2025-03-03 19:50:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600712,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:50:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600712,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:50:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600712,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:50:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600712,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:50:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600712', 'tblTempUsageDetail_20' ) start [2025-03-03 19:50:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600712', 'tblTempUsageDetail_20' ) end [2025-03-03 19:50:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:50:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:50:23] Production.INFO: ==23816== Releasing lock... [2025-03-03 19:50:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:50:23] Production.INFO: 45.5 MB #Memory Used# [2025-03-03 19:51:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:51:05 [end_date_ymd] => 2025-03-03 19:51:05 [RateCDR] => 1 ) [2025-03-03 19:51:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 16:51:05' and `end` < '2025-03-03 19:51:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 19:51:18] Production.INFO: count ==2300 [2025-03-03 19:51:18] Production.ERROR: pbx CDR StartTime 2025-03-03 16:51:05 - End Time 2025-03-03 19:51:05 [2025-03-03 19:51:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600717', 'tblTempUsageDetail_20' ) start [2025-03-03 19:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600717', 'tblTempUsageDetail_20' ) end [2025-03-03 19:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600717', 'tblTempVendorCDR_20' ) start [2025-03-03 19:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600717', 'tblTempVendorCDR_20' ) end [2025-03-03 19:51:18] Production.INFO: ProcessCDR(1,14600717,1,1,2) [2025-03-03 19:51:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600717,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:51:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600717,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:51:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600717,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:51:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600717,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:51:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600717', 'tblTempUsageDetail_20' ) start [2025-03-03 19:51:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600717', 'tblTempUsageDetail_20' ) end [2025-03-03 19:51:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:51:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:51:21] Production.INFO: ==23890== Releasing lock... [2025-03-03 19:51:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:51:21] Production.INFO: 45.25 MB #Memory Used# [2025-03-03 19:52:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:52:05 [end_date_ymd] => 2025-03-03 19:52:05 [RateCDR] => 1 ) [2025-03-03 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-03 16:52:05' and `end` < '2025-03-03 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-03 19:52:18] Production.INFO: count ==2288 [2025-03-03 19:52:18] Production.ERROR: pbx CDR StartTime 2025-03-03 16:52:05 - End Time 2025-03-03 19:52:05 [2025-03-03 19:52:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600722', 'tblTempUsageDetail_20' ) start [2025-03-03 19:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600722', 'tblTempUsageDetail_20' ) end [2025-03-03 19:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600722', 'tblTempVendorCDR_20' ) start [2025-03-03 19:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600722', 'tblTempVendorCDR_20' ) end [2025-03-03 19:52:18] Production.INFO: ProcessCDR(1,14600722,1,1,2) [2025-03-03 19:52:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600722,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:52:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600722,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:52:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600722,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:52:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600722,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:52:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600722', 'tblTempUsageDetail_20' ) start [2025-03-03 19:52:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600722', 'tblTempUsageDetail_20' ) end [2025-03-03 19:52:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:52:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:52:22] Production.INFO: ==23960== Releasing lock... [2025-03-03 19:52:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:52:22] Production.INFO: 45.25 MB #Memory Used# [2025-03-03 19:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:53:05 [end_date_ymd] => 2025-03-03 19:53:05 [RateCDR] => 1 ) [2025-03-03 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-03 16:53:05' and `end` < '2025-03-03 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-03 19:53:17] Production.INFO: count ==2269 [2025-03-03 19:53:18] Production.ERROR: pbx CDR StartTime 2025-03-03 16:53:05 - End Time 2025-03-03 19:53:05 [2025-03-03 19:53:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:53:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600727', 'tblTempUsageDetail_20' ) start [2025-03-03 19:53:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600727', 'tblTempUsageDetail_20' ) end [2025-03-03 19:53:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600727', 'tblTempVendorCDR_20' ) start [2025-03-03 19:53:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600727', 'tblTempVendorCDR_20' ) end [2025-03-03 19:53:18] Production.INFO: ProcessCDR(1,14600727,1,1,2) [2025-03-03 19:53:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600727,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:53:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600727,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:53:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600727,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:53:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600727,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600727', 'tblTempUsageDetail_20' ) start [2025-03-03 19:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600727', 'tblTempUsageDetail_20' ) end [2025-03-03 19:53:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:53:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:53:21] Production.INFO: ==24032== Releasing lock... [2025-03-03 19:53:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:53:21] Production.INFO: 45 MB #Memory Used# [2025-03-03 19:54:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:54:05 [end_date_ymd] => 2025-03-03 19:54:05 [RateCDR] => 1 ) [2025-03-03 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-03 16:54:05' and `end` < '2025-03-03 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-03 19:54:17] Production.INFO: count ==2241 [2025-03-03 19:54:17] Production.ERROR: pbx CDR StartTime 2025-03-03 16:54:05 - End Time 2025-03-03 19:54:05 [2025-03-03 19:54:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600732', 'tblTempUsageDetail_20' ) start [2025-03-03 19:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600732', 'tblTempUsageDetail_20' ) end [2025-03-03 19:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600732', 'tblTempVendorCDR_20' ) start [2025-03-03 19:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600732', 'tblTempVendorCDR_20' ) end [2025-03-03 19:54:18] Production.INFO: ProcessCDR(1,14600732,1,1,2) [2025-03-03 19:54:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600732,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:54:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600732,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:54:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600732,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:54:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600732,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:54:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600732', 'tblTempUsageDetail_20' ) start [2025-03-03 19:54:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600732', 'tblTempUsageDetail_20' ) end [2025-03-03 19:54:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:54:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:54:21] Production.INFO: ==24101== Releasing lock... [2025-03-03 19:54:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:54:21] Production.INFO: 45 MB #Memory Used# [2025-03-03 19:55:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:55:05 [end_date_ymd] => 2025-03-03 19:55:05 [RateCDR] => 1 ) [2025-03-03 19: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-03 16:55:05' and `end` < '2025-03-03 19: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-03 19:55:18] Production.INFO: count ==2236 [2025-03-03 19:55:19] Production.ERROR: pbx CDR StartTime 2025-03-03 16:55:05 - End Time 2025-03-03 19:55:05 [2025-03-03 19:55:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:55:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600737', 'tblTempUsageDetail_20' ) start [2025-03-03 19:55:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600737', 'tblTempUsageDetail_20' ) end [2025-03-03 19:55:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600737', 'tblTempVendorCDR_20' ) start [2025-03-03 19:55:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600737', 'tblTempVendorCDR_20' ) end [2025-03-03 19:55:19] Production.INFO: ProcessCDR(1,14600737,1,1,2) [2025-03-03 19:55:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600737,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:55:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600737,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:55:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600737,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:55:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600737,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:55:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600737', 'tblTempUsageDetail_20' ) start [2025-03-03 19:55:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600737', 'tblTempUsageDetail_20' ) end [2025-03-03 19:55:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:55:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:55:22] Production.INFO: ==24210== Releasing lock... [2025-03-03 19:55:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:55:22] Production.INFO: 44.75 MB #Memory Used# [2025-03-03 19:56:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:56:05 [end_date_ymd] => 2025-03-03 19:56:05 [RateCDR] => 1 ) [2025-03-03 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-03 16:56:05' and `end` < '2025-03-03 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-03 19:56:17] Production.INFO: count ==2225 [2025-03-03 19:56:18] Production.ERROR: pbx CDR StartTime 2025-03-03 16:56:05 - End Time 2025-03-03 19:56:05 [2025-03-03 19:56:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600742', 'tblTempUsageDetail_20' ) start [2025-03-03 19:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600742', 'tblTempUsageDetail_20' ) end [2025-03-03 19:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600742', 'tblTempVendorCDR_20' ) start [2025-03-03 19:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600742', 'tblTempVendorCDR_20' ) end [2025-03-03 19:56:18] Production.INFO: ProcessCDR(1,14600742,1,1,2) [2025-03-03 19:56:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600742,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:56:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600742,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:56:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600742,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:56:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600742,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:56:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600742', 'tblTempUsageDetail_20' ) start [2025-03-03 19:56:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600742', 'tblTempUsageDetail_20' ) end [2025-03-03 19:56:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:56:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:56:21] Production.INFO: ==24281== Releasing lock... [2025-03-03 19:56:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:56:21] Production.INFO: 44.75 MB #Memory Used# [2025-03-03 19:57:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:57:05 [end_date_ymd] => 2025-03-03 19:57:05 [RateCDR] => 1 ) [2025-03-03 19:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 16:57:05' and `end` < '2025-03-03 19:57:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 19:57:17] Production.INFO: count ==2210 [2025-03-03 19:57:18] Production.ERROR: pbx CDR StartTime 2025-03-03 16:57:05 - End Time 2025-03-03 19:57:05 [2025-03-03 19:57:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600747', 'tblTempUsageDetail_20' ) start [2025-03-03 19:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600747', 'tblTempUsageDetail_20' ) end [2025-03-03 19:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600747', 'tblTempVendorCDR_20' ) start [2025-03-03 19:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600747', 'tblTempVendorCDR_20' ) end [2025-03-03 19:57:18] Production.INFO: ProcessCDR(1,14600747,1,1,2) [2025-03-03 19:57:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600747,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:57:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600747,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:57:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600747,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:57:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600747,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:57:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600747', 'tblTempUsageDetail_20' ) start [2025-03-03 19:57:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600747', 'tblTempUsageDetail_20' ) end [2025-03-03 19:57:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:57:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:57:21] Production.INFO: ==24355== Releasing lock... [2025-03-03 19:57:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:57:21] Production.INFO: 44.75 MB #Memory Used# [2025-03-03 19:58:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:58:06 [end_date_ymd] => 2025-03-03 19:58:06 [RateCDR] => 1 ) [2025-03-03 19: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-03 16:58:06' and `end` < '2025-03-03 19: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-03 19:58:18] Production.INFO: count ==2208 [2025-03-03 19:58:18] Production.ERROR: pbx CDR StartTime 2025-03-03 16:58:06 - End Time 2025-03-03 19:58:06 [2025-03-03 19:58:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600752', 'tblTempUsageDetail_20' ) start [2025-03-03 19:58:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600752', 'tblTempUsageDetail_20' ) end [2025-03-03 19:58:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600752', 'tblTempVendorCDR_20' ) start [2025-03-03 19:58:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600752', 'tblTempVendorCDR_20' ) end [2025-03-03 19:58:19] Production.INFO: ProcessCDR(1,14600752,1,1,2) [2025-03-03 19:58:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600752,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:58:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600752,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:58:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600752,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:58:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600752,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:58:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600752', 'tblTempUsageDetail_20' ) start [2025-03-03 19:58:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600752', 'tblTempUsageDetail_20' ) end [2025-03-03 19:58:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:58:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:58:23] Production.INFO: ==24428== Releasing lock... [2025-03-03 19:58:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:58:23] Production.INFO: 44.75 MB #Memory Used# [2025-03-03 19:59:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 16:59:05 [end_date_ymd] => 2025-03-03 19:59:05 [RateCDR] => 1 ) [2025-03-03 19:59:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 16:59:05' and `end` < '2025-03-03 19:59:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 19:59:17] Production.INFO: count ==2201 [2025-03-03 19:59:18] Production.ERROR: pbx CDR StartTime 2025-03-03 16:59:05 - End Time 2025-03-03 19:59:05 [2025-03-03 19:59:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 19:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600757', 'tblTempUsageDetail_20' ) start [2025-03-03 19:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600757', 'tblTempUsageDetail_20' ) end [2025-03-03 19:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600757', 'tblTempVendorCDR_20' ) start [2025-03-03 19:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600757', 'tblTempVendorCDR_20' ) end [2025-03-03 19:59:18] Production.INFO: ProcessCDR(1,14600757,1,1,2) [2025-03-03 19:59:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600757,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:59:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600757,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 19:59:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600757,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:59:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600757,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 19:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600757', 'tblTempUsageDetail_20' ) start [2025-03-03 19:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600757', 'tblTempUsageDetail_20' ) end [2025-03-03 19:59:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 19:59:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 19:59:21] Production.INFO: ==24498== Releasing lock... [2025-03-03 19:59:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 19:59:21] Production.INFO: 44.75 MB #Memory Used# [2025-03-03 20:00:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:00:06 [end_date_ymd] => 2025-03-03 20:00:06 [RateCDR] => 1 ) [2025-03-03 20:00:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 17:00:06' and `end` < '2025-03-03 20:00:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 20:00:18] Production.INFO: count ==2194 [2025-03-03 20:00:19] Production.ERROR: pbx CDR StartTime 2025-03-03 17:00:06 - End Time 2025-03-03 20:00:06 [2025-03-03 20:00:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:00:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600763', 'tblTempUsageDetail_20' ) start [2025-03-03 20:00:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600763', 'tblTempUsageDetail_20' ) end [2025-03-03 20:00:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600763', 'tblTempVendorCDR_20' ) start [2025-03-03 20:00:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600763', 'tblTempVendorCDR_20' ) end [2025-03-03 20:00:19] Production.INFO: ProcessCDR(1,14600763,1,1,2) [2025-03-03 20:00:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600763,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:00:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600763,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:00:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600763,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:00:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600763,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:00:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600763', 'tblTempUsageDetail_20' ) start [2025-03-03 20:00:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600763', 'tblTempUsageDetail_20' ) end [2025-03-03 20:00:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:00:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:00:22] Production.INFO: ==24576== Releasing lock... [2025-03-03 20:00:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:00:22] Production.INFO: 44.5 MB #Memory Used# [2025-03-03 20:01:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:01:05 [end_date_ymd] => 2025-03-03 20:01:05 [RateCDR] => 1 ) [2025-03-03 20:01:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 17:01:05' and `end` < '2025-03-03 20:01:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 20:01:17] Production.INFO: count ==2101 [2025-03-03 20:01:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:01:05 - End Time 2025-03-03 20:01:05 [2025-03-03 20:01:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600768', 'tblTempUsageDetail_20' ) start [2025-03-03 20:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600768', 'tblTempUsageDetail_20' ) end [2025-03-03 20:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600768', 'tblTempVendorCDR_20' ) start [2025-03-03 20:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600768', 'tblTempVendorCDR_20' ) end [2025-03-03 20:01:18] Production.INFO: ProcessCDR(1,14600768,1,1,2) [2025-03-03 20:01:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600768,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:01:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600768,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:01:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600768,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:01:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600768,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600768', 'tblTempUsageDetail_20' ) start [2025-03-03 20:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600768', 'tblTempUsageDetail_20' ) end [2025-03-03 20:01:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:01:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:01:21] Production.INFO: ==24703== Releasing lock... [2025-03-03 20:01:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:01:21] Production.INFO: 44 MB #Memory Used# [2025-03-03 20:02:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:02:06 [end_date_ymd] => 2025-03-03 20:02:06 [RateCDR] => 1 ) [2025-03-03 20:02:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 17:02:06' and `end` < '2025-03-03 20:02:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 20:02:18] Production.INFO: count ==2076 [2025-03-03 20:02:19] Production.ERROR: pbx CDR StartTime 2025-03-03 17:02:06 - End Time 2025-03-03 20:02:06 [2025-03-03 20:02:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:02:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600773', 'tblTempUsageDetail_20' ) start [2025-03-03 20:02:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600773', 'tblTempUsageDetail_20' ) end [2025-03-03 20:02:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600773', 'tblTempVendorCDR_20' ) start [2025-03-03 20:02:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600773', 'tblTempVendorCDR_20' ) end [2025-03-03 20:02:19] Production.INFO: ProcessCDR(1,14600773,1,1,2) [2025-03-03 20:02:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600773,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:02:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600773,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:02:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600773,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:02:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600773,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:02:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600773', 'tblTempUsageDetail_20' ) start [2025-03-03 20:02:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600773', 'tblTempUsageDetail_20' ) end [2025-03-03 20:02:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:02:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:02:24] Production.INFO: ==24774== Releasing lock... [2025-03-03 20:02:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:02:24] Production.INFO: 43.5 MB #Memory Used# [2025-03-03 20:03:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:03:06 [end_date_ymd] => 2025-03-03 20:03:06 [RateCDR] => 1 ) [2025-03-03 20: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-03 17:03:06' and `end` < '2025-03-03 20: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-03 20:03:18] Production.INFO: count ==2056 [2025-03-03 20:03:19] Production.ERROR: pbx CDR StartTime 2025-03-03 17:03:06 - End Time 2025-03-03 20:03:06 [2025-03-03 20:03:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:03:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600778', 'tblTempUsageDetail_20' ) start [2025-03-03 20:03:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600778', 'tblTempUsageDetail_20' ) end [2025-03-03 20:03:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600778', 'tblTempVendorCDR_20' ) start [2025-03-03 20:03:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600778', 'tblTempVendorCDR_20' ) end [2025-03-03 20:03:19] Production.INFO: ProcessCDR(1,14600778,1,1,2) [2025-03-03 20:03:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600778,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:03:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600778,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:03:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600778,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:03:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600778,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:03:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600778', 'tblTempUsageDetail_20' ) start [2025-03-03 20:03:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600778', 'tblTempUsageDetail_20' ) end [2025-03-03 20:03:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:03:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:03:24] Production.INFO: ==24845== Releasing lock... [2025-03-03 20:03:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:03:24] Production.INFO: 43.25 MB #Memory Used# [2025-03-03 20:04:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:04:06 [end_date_ymd] => 2025-03-03 20:04:06 [RateCDR] => 1 ) [2025-03-03 20: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-03 17:04:06' and `end` < '2025-03-03 20: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-03 20:04:18] Production.INFO: count ==2046 [2025-03-03 20:04:19] Production.ERROR: pbx CDR StartTime 2025-03-03 17:04:06 - End Time 2025-03-03 20:04:06 [2025-03-03 20:04:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:04:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600783', 'tblTempUsageDetail_20' ) start [2025-03-03 20:04:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600783', 'tblTempUsageDetail_20' ) end [2025-03-03 20:04:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600783', 'tblTempVendorCDR_20' ) start [2025-03-03 20:04:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600783', 'tblTempVendorCDR_20' ) end [2025-03-03 20:04:19] Production.INFO: ProcessCDR(1,14600783,1,1,2) [2025-03-03 20:04:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600783,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:04:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600783,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:04:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600783,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:04:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600783,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:04:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600783', 'tblTempUsageDetail_20' ) start [2025-03-03 20:04:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600783', 'tblTempUsageDetail_20' ) end [2025-03-03 20:04:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:04:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:04:24] Production.INFO: ==24919== Releasing lock... [2025-03-03 20:04:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:04:24] Production.INFO: 43.5 MB #Memory Used# [2025-03-03 20:05:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:05:06 [end_date_ymd] => 2025-03-03 20:05:06 [RateCDR] => 1 ) [2025-03-03 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-03 17:05:06' and `end` < '2025-03-03 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-03 20:05:18] Production.INFO: count ==2032 [2025-03-03 20:05:19] Production.ERROR: pbx CDR StartTime 2025-03-03 17:05:06 - End Time 2025-03-03 20:05:06 [2025-03-03 20:05:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:05:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600788', 'tblTempUsageDetail_20' ) start [2025-03-03 20:05:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600788', 'tblTempUsageDetail_20' ) end [2025-03-03 20:05:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600788', 'tblTempVendorCDR_20' ) start [2025-03-03 20:05:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600788', 'tblTempVendorCDR_20' ) end [2025-03-03 20:05:19] Production.INFO: ProcessCDR(1,14600788,1,1,2) [2025-03-03 20:05:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600788,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:05:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600788,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:05:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600788,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:05:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600788,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:05:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600788', 'tblTempUsageDetail_20' ) start [2025-03-03 20:05:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600788', 'tblTempUsageDetail_20' ) end [2025-03-03 20:05:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:05:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:05:23] Production.INFO: ==24994== Releasing lock... [2025-03-03 20:05:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:05:23] Production.INFO: 43 MB #Memory Used# [2025-03-03 20:06:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:06:06 [end_date_ymd] => 2025-03-03 20:06:06 [RateCDR] => 1 ) [2025-03-03 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-03 17:06:06' and `end` < '2025-03-03 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-03 20:06:19] Production.INFO: count ==2013 [2025-03-03 20:06:19] Production.ERROR: pbx CDR StartTime 2025-03-03 17:06:06 - End Time 2025-03-03 20:06:06 [2025-03-03 20:06:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:06:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600793', 'tblTempUsageDetail_20' ) start [2025-03-03 20:06:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600793', 'tblTempUsageDetail_20' ) end [2025-03-03 20:06:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600793', 'tblTempVendorCDR_20' ) start [2025-03-03 20:06:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600793', 'tblTempVendorCDR_20' ) end [2025-03-03 20:06:19] Production.INFO: ProcessCDR(1,14600793,1,1,2) [2025-03-03 20:06:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600793,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:06:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600793,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:06:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600793,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:06:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600793,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:06:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600793', 'tblTempUsageDetail_20' ) start [2025-03-03 20:06:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600793', 'tblTempUsageDetail_20' ) end [2025-03-03 20:06:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:06:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:06:23] Production.INFO: ==25064== Releasing lock... [2025-03-03 20:06:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:06:23] Production.INFO: 43 MB #Memory Used# [2025-03-03 20:07:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:07:06 [end_date_ymd] => 2025-03-03 20:07:06 [RateCDR] => 1 ) [2025-03-03 20:07:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 17:07:06' and `end` < '2025-03-03 20:07:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 20:07:18] Production.INFO: count ==2002 [2025-03-03 20:07:19] Production.ERROR: pbx CDR StartTime 2025-03-03 17:07:06 - End Time 2025-03-03 20:07:06 [2025-03-03 20:07:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:07:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600798', 'tblTempUsageDetail_20' ) start [2025-03-03 20:07:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600798', 'tblTempUsageDetail_20' ) end [2025-03-03 20:07:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600798', 'tblTempVendorCDR_20' ) start [2025-03-03 20:07:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600798', 'tblTempVendorCDR_20' ) end [2025-03-03 20:07:19] Production.INFO: ProcessCDR(1,14600798,1,1,2) [2025-03-03 20:07:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600798,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:07:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600798,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:07:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600798,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:07:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600798,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:07:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600798', 'tblTempUsageDetail_20' ) start [2025-03-03 20:07:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600798', 'tblTempUsageDetail_20' ) end [2025-03-03 20:07:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:07:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:07:24] Production.INFO: ==25135== Releasing lock... [2025-03-03 20:07:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:07:24] Production.INFO: 42.75 MB #Memory Used# [2025-03-03 20:08:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:08:06 [end_date_ymd] => 2025-03-03 20:08:06 [RateCDR] => 1 ) [2025-03-03 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-03 17:08:06' and `end` < '2025-03-03 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-03 20:08:18] Production.INFO: count ==1996 [2025-03-03 20:08:19] Production.ERROR: pbx CDR StartTime 2025-03-03 17:08:06 - End Time 2025-03-03 20:08:06 [2025-03-03 20:08:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:08:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600803', 'tblTempUsageDetail_20' ) start [2025-03-03 20:08:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600803', 'tblTempUsageDetail_20' ) end [2025-03-03 20:08:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600803', 'tblTempVendorCDR_20' ) start [2025-03-03 20:08:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600803', 'tblTempVendorCDR_20' ) end [2025-03-03 20:08:19] Production.INFO: ProcessCDR(1,14600803,1,1,2) [2025-03-03 20:08:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600803,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:08:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600803,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:08:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600803,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:08:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600803,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:08:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600803', 'tblTempUsageDetail_20' ) start [2025-03-03 20:08:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600803', 'tblTempUsageDetail_20' ) end [2025-03-03 20:08:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:08:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:08:24] Production.INFO: ==25210== Releasing lock... [2025-03-03 20:08:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:08:24] Production.INFO: 43 MB #Memory Used# [2025-03-03 20:09:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:09:06 [end_date_ymd] => 2025-03-03 20:09:06 [RateCDR] => 1 ) [2025-03-03 20: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-03 17:09:06' and `end` < '2025-03-03 20: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-03 20:09:18] Production.INFO: count ==1994 [2025-03-03 20:09:19] Production.ERROR: pbx CDR StartTime 2025-03-03 17:09:06 - End Time 2025-03-03 20:09:06 [2025-03-03 20:09:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:09:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600808', 'tblTempUsageDetail_20' ) start [2025-03-03 20:09:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600808', 'tblTempUsageDetail_20' ) end [2025-03-03 20:09:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600808', 'tblTempVendorCDR_20' ) start [2025-03-03 20:09:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600808', 'tblTempVendorCDR_20' ) end [2025-03-03 20:09:19] Production.INFO: ProcessCDR(1,14600808,1,1,2) [2025-03-03 20:09:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600808,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:09:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600808,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:09:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600808,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:09:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600808,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:09:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600808', 'tblTempUsageDetail_20' ) start [2025-03-03 20:09:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600808', 'tblTempUsageDetail_20' ) end [2025-03-03 20:09:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:09:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:09:24] Production.INFO: ==25285== Releasing lock... [2025-03-03 20:09:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:09:24] Production.INFO: 42.75 MB #Memory Used# [2025-03-03 20:10:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:10:07 [end_date_ymd] => 2025-03-03 20:10:07 [RateCDR] => 1 ) [2025-03-03 20: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-03 17:10:07' and `end` < '2025-03-03 20: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-03 20:10:19] Production.INFO: count ==1978 [2025-03-03 20:10:19] Production.ERROR: pbx CDR StartTime 2025-03-03 17:10:07 - End Time 2025-03-03 20:10:07 [2025-03-03 20:10:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:10:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600814', 'tblTempUsageDetail_20' ) start [2025-03-03 20:10:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600814', 'tblTempUsageDetail_20' ) end [2025-03-03 20:10:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600814', 'tblTempVendorCDR_20' ) start [2025-03-03 20:10:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600814', 'tblTempVendorCDR_20' ) end [2025-03-03 20:10:20] Production.INFO: ProcessCDR(1,14600814,1,1,2) [2025-03-03 20:10:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600814,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:10:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600814,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:10:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600814,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:10:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600814,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:10:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600814', 'tblTempUsageDetail_20' ) start [2025-03-03 20:10:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600814', 'tblTempUsageDetail_20' ) end [2025-03-03 20:10:25] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:10:25] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:10:25] Production.INFO: ==25366== Releasing lock... [2025-03-03 20:10:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:10:25] Production.INFO: 42.75 MB #Memory Used# [2025-03-03 20:11:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:11:06 [end_date_ymd] => 2025-03-03 20:11:06 [RateCDR] => 1 ) [2025-03-03 20: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-03 17:11:06' and `end` < '2025-03-03 20: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-03 20:11:19] Production.INFO: count ==1929 [2025-03-03 20:11:19] Production.ERROR: pbx CDR StartTime 2025-03-03 17:11:06 - End Time 2025-03-03 20:11:06 [2025-03-03 20:11:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:11:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600819', 'tblTempUsageDetail_20' ) start [2025-03-03 20:11:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600819', 'tblTempUsageDetail_20' ) end [2025-03-03 20:11:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600819', 'tblTempVendorCDR_20' ) start [2025-03-03 20:11:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600819', 'tblTempVendorCDR_20' ) end [2025-03-03 20:11:19] Production.INFO: ProcessCDR(1,14600819,1,1,2) [2025-03-03 20:11:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600819,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:11:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600819,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:11:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600819,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:11:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600819,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:11:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600819', 'tblTempUsageDetail_20' ) start [2025-03-03 20:11:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600819', 'tblTempUsageDetail_20' ) end [2025-03-03 20:11:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:11:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:11:24] Production.INFO: ==25479== Releasing lock... [2025-03-03 20:11:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:11:24] Production.INFO: 42.25 MB #Memory Used# [2025-03-03 20:12:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:12:05 [end_date_ymd] => 2025-03-03 20:12:05 [RateCDR] => 1 ) [2025-03-03 20:12:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 17:12:05' and `end` < '2025-03-03 20:12:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 20:12:18] Production.INFO: count ==1931 [2025-03-03 20:12:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:12:05 - End Time 2025-03-03 20:12:05 [2025-03-03 20:12:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600824', 'tblTempUsageDetail_20' ) start [2025-03-03 20:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600824', 'tblTempUsageDetail_20' ) end [2025-03-03 20:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600824', 'tblTempVendorCDR_20' ) start [2025-03-03 20:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600824', 'tblTempVendorCDR_20' ) end [2025-03-03 20:12:18] Production.INFO: ProcessCDR(1,14600824,1,1,2) [2025-03-03 20:12:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600824,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:12:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600824,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:12:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600824,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:12:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600824,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:12:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600824', 'tblTempUsageDetail_20' ) start [2025-03-03 20:12:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600824', 'tblTempUsageDetail_20' ) end [2025-03-03 20:12:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:12:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:12:24] Production.INFO: ==25550== Releasing lock... [2025-03-03 20:12:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:12:24] Production.INFO: 42.25 MB #Memory Used# [2025-03-03 20:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:13:05 [end_date_ymd] => 2025-03-03 20:13:05 [RateCDR] => 1 ) [2025-03-03 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-03 17:13:05' and `end` < '2025-03-03 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-03 20:13:17] Production.INFO: count ==1930 [2025-03-03 20:13:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:13:05 - End Time 2025-03-03 20:13:05 [2025-03-03 20:13:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600829', 'tblTempUsageDetail_20' ) start [2025-03-03 20:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600829', 'tblTempUsageDetail_20' ) end [2025-03-03 20:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600829', 'tblTempVendorCDR_20' ) start [2025-03-03 20:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600829', 'tblTempVendorCDR_20' ) end [2025-03-03 20:13:18] Production.INFO: ProcessCDR(1,14600829,1,1,2) [2025-03-03 20:13:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600829,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:13:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600829,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:13:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600829,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:13:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600829,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:13:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600829', 'tblTempUsageDetail_20' ) start [2025-03-03 20:13:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600829', 'tblTempUsageDetail_20' ) end [2025-03-03 20:13:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:13:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:13:21] Production.INFO: ==25623== Releasing lock... [2025-03-03 20:13:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:13:21] Production.INFO: 42.25 MB #Memory Used# [2025-03-03 20:14:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:14:06 [end_date_ymd] => 2025-03-03 20:14:06 [RateCDR] => 1 ) [2025-03-03 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-03 17:14:06' and `end` < '2025-03-03 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-03 20:14:18] Production.INFO: count ==1925 [2025-03-03 20:14:19] Production.ERROR: pbx CDR StartTime 2025-03-03 17:14:06 - End Time 2025-03-03 20:14:06 [2025-03-03 20:14:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:14:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600834', 'tblTempUsageDetail_20' ) start [2025-03-03 20:14:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600834', 'tblTempUsageDetail_20' ) end [2025-03-03 20:14:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600834', 'tblTempVendorCDR_20' ) start [2025-03-03 20:14:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600834', 'tblTempVendorCDR_20' ) end [2025-03-03 20:14:19] Production.INFO: ProcessCDR(1,14600834,1,1,2) [2025-03-03 20:14:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600834,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:14:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600834,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:14:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600834,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:14:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600834,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:14:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600834', 'tblTempUsageDetail_20' ) start [2025-03-03 20:14:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600834', 'tblTempUsageDetail_20' ) end [2025-03-03 20:14:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:14:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:14:22] Production.INFO: ==25698== Releasing lock... [2025-03-03 20:14:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:14:22] Production.INFO: 42.5 MB #Memory Used# [2025-03-03 20:15:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:15:06 [end_date_ymd] => 2025-03-03 20:15:06 [RateCDR] => 1 ) [2025-03-03 20: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-03 17:15:06' and `end` < '2025-03-03 20: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-03 20:15:18] Production.INFO: count ==1922 [2025-03-03 20:15:19] Production.ERROR: pbx CDR StartTime 2025-03-03 17:15:06 - End Time 2025-03-03 20:15:06 [2025-03-03 20:15:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:15:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600839', 'tblTempUsageDetail_20' ) start [2025-03-03 20:15:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600839', 'tblTempUsageDetail_20' ) end [2025-03-03 20:15:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600839', 'tblTempVendorCDR_20' ) start [2025-03-03 20:15:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600839', 'tblTempVendorCDR_20' ) end [2025-03-03 20:15:19] Production.INFO: ProcessCDR(1,14600839,1,1,2) [2025-03-03 20:15:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600839,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:15:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600839,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:15:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600839,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:15:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600839,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:15:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600839', 'tblTempUsageDetail_20' ) start [2025-03-03 20:15:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600839', 'tblTempUsageDetail_20' ) end [2025-03-03 20:15:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:15:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:15:24] Production.INFO: ==25779== Releasing lock... [2025-03-03 20:15:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:15:24] Production.INFO: 42.5 MB #Memory Used# [2025-03-03 20:16:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:16:06 [end_date_ymd] => 2025-03-03 20:16:06 [RateCDR] => 1 ) [2025-03-03 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-03 17:16:06' and `end` < '2025-03-03 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-03 20:16:18] Production.INFO: count ==1912 [2025-03-03 20:16:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:16:06 - End Time 2025-03-03 20:16:06 [2025-03-03 20:16:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600844', 'tblTempUsageDetail_20' ) start [2025-03-03 20:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600844', 'tblTempUsageDetail_20' ) end [2025-03-03 20:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600844', 'tblTempVendorCDR_20' ) start [2025-03-03 20:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600844', 'tblTempVendorCDR_20' ) end [2025-03-03 20:16:18] Production.INFO: ProcessCDR(1,14600844,1,1,2) [2025-03-03 20:16:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600844,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:16:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600844,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:16:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600844,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:16:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600844,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:16:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600844', 'tblTempUsageDetail_20' ) start [2025-03-03 20:16:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600844', 'tblTempUsageDetail_20' ) end [2025-03-03 20:16:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:16:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:16:22] Production.INFO: ==25855== Releasing lock... [2025-03-03 20:16:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:16:22] Production.INFO: 42.25 MB #Memory Used# [2025-03-03 20:17:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:17:05 [end_date_ymd] => 2025-03-03 20:17:05 [RateCDR] => 1 ) [2025-03-03 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-03 17:17:05' and `end` < '2025-03-03 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-03 20:17:18] Production.INFO: count ==1897 [2025-03-03 20:17:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:17:05 - End Time 2025-03-03 20:17:05 [2025-03-03 20:17:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600849', 'tblTempUsageDetail_20' ) start [2025-03-03 20:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600849', 'tblTempUsageDetail_20' ) end [2025-03-03 20:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600849', 'tblTempVendorCDR_20' ) start [2025-03-03 20:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600849', 'tblTempVendorCDR_20' ) end [2025-03-03 20:17:18] Production.INFO: ProcessCDR(1,14600849,1,1,2) [2025-03-03 20:17:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600849,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:17:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600849,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:17:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600849,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:17:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600849,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:17:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600849', 'tblTempUsageDetail_20' ) start [2025-03-03 20:17:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600849', 'tblTempUsageDetail_20' ) end [2025-03-03 20:17:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:17:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:17:22] Production.INFO: ==25930== Releasing lock... [2025-03-03 20:17:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:17:22] Production.INFO: 42.25 MB #Memory Used# [2025-03-03 20:18:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:18:06 [end_date_ymd] => 2025-03-03 20:18:06 [RateCDR] => 1 ) [2025-03-03 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-03 17:18:06' and `end` < '2025-03-03 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-03 20:18:18] Production.INFO: count ==1891 [2025-03-03 20:18:19] Production.ERROR: pbx CDR StartTime 2025-03-03 17:18:06 - End Time 2025-03-03 20:18:06 [2025-03-03 20:18:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:18:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600854', 'tblTempUsageDetail_20' ) start [2025-03-03 20:18:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600854', 'tblTempUsageDetail_20' ) end [2025-03-03 20:18:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600854', 'tblTempVendorCDR_20' ) start [2025-03-03 20:18:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600854', 'tblTempVendorCDR_20' ) end [2025-03-03 20:18:19] Production.INFO: ProcessCDR(1,14600854,1,1,2) [2025-03-03 20:18:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600854,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:18:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600854,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:18:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600854,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:18:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600854,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:18:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600854', 'tblTempUsageDetail_20' ) start [2025-03-03 20:18:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600854', 'tblTempUsageDetail_20' ) end [2025-03-03 20:18:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:18:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:18:22] Production.INFO: ==26016== Releasing lock... [2025-03-03 20:18:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:18:22] Production.INFO: 42.25 MB #Memory Used# [2025-03-03 20:19:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:19:06 [end_date_ymd] => 2025-03-03 20:19:06 [RateCDR] => 1 ) [2025-03-03 20: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-03 17:19:06' and `end` < '2025-03-03 20: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-03 20:19:18] Production.INFO: count ==1890 [2025-03-03 20:19:19] Production.ERROR: pbx CDR StartTime 2025-03-03 17:19:06 - End Time 2025-03-03 20:19:06 [2025-03-03 20:19:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:19:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600859', 'tblTempUsageDetail_20' ) start [2025-03-03 20:19:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600859', 'tblTempUsageDetail_20' ) end [2025-03-03 20:19:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600859', 'tblTempVendorCDR_20' ) start [2025-03-03 20:19:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600859', 'tblTempVendorCDR_20' ) end [2025-03-03 20:19:19] Production.INFO: ProcessCDR(1,14600859,1,1,2) [2025-03-03 20:19:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600859,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:19:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600859,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:19:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600859,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:19:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600859,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:19:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600859', 'tblTempUsageDetail_20' ) start [2025-03-03 20:19:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600859', 'tblTempUsageDetail_20' ) end [2025-03-03 20:19:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:19:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:19:23] Production.INFO: ==26096== Releasing lock... [2025-03-03 20:19:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:19:23] Production.INFO: 42 MB #Memory Used# [2025-03-03 20:20:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:20:07 [end_date_ymd] => 2025-03-03 20:20:07 [RateCDR] => 1 ) [2025-03-03 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-03 17:20:07' and `end` < '2025-03-03 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-03 20:20:19] Production.INFO: count ==1881 [2025-03-03 20:20:20] Production.ERROR: pbx CDR StartTime 2025-03-03 17:20:07 - End Time 2025-03-03 20:20:07 [2025-03-03 20:20:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:20:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600865', 'tblTempUsageDetail_20' ) start [2025-03-03 20:20:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600865', 'tblTempUsageDetail_20' ) end [2025-03-03 20:20:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600865', 'tblTempVendorCDR_20' ) start [2025-03-03 20:20:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600865', 'tblTempVendorCDR_20' ) end [2025-03-03 20:20:20] Production.INFO: ProcessCDR(1,14600865,1,1,2) [2025-03-03 20:20:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600865,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:20:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600865,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:20:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600865,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:20:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600865,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:20:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600865', 'tblTempUsageDetail_20' ) start [2025-03-03 20:20:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600865', 'tblTempUsageDetail_20' ) end [2025-03-03 20:20:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:20:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:20:23] Production.INFO: ==26172== Releasing lock... [2025-03-03 20:20:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:20:23] Production.INFO: 42 MB #Memory Used# [2025-03-03 20:21:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:21:06 [end_date_ymd] => 2025-03-03 20:21:06 [RateCDR] => 1 ) [2025-03-03 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-03 17:21:06' and `end` < '2025-03-03 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-03 20:21:18] Production.INFO: count ==1825 [2025-03-03 20:21:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:21:06 - End Time 2025-03-03 20:21:06 [2025-03-03 20:21:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:21:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600870', 'tblTempUsageDetail_20' ) start [2025-03-03 20:21:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600870', 'tblTempUsageDetail_20' ) end [2025-03-03 20:21:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600870', 'tblTempVendorCDR_20' ) start [2025-03-03 20:21:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600870', 'tblTempVendorCDR_20' ) end [2025-03-03 20:21:19] Production.INFO: ProcessCDR(1,14600870,1,1,2) [2025-03-03 20:21:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600870,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:21:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600870,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:21:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600870,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:21:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600870,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:21:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600870', 'tblTempUsageDetail_20' ) start [2025-03-03 20:21:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600870', 'tblTempUsageDetail_20' ) end [2025-03-03 20:21:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:21:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:21:22] Production.INFO: ==26249== Releasing lock... [2025-03-03 20:21:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:21:22] Production.INFO: 41.75 MB #Memory Used# [2025-03-03 20:22:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:22:06 [end_date_ymd] => 2025-03-03 20:22:06 [RateCDR] => 1 ) [2025-03-03 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-03 17:22:06' and `end` < '2025-03-03 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-03 20:22:18] Production.INFO: count ==1823 [2025-03-03 20:22:19] Production.ERROR: pbx CDR StartTime 2025-03-03 17:22:06 - End Time 2025-03-03 20:22:06 [2025-03-03 20:22:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:22:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600875', 'tblTempUsageDetail_20' ) start [2025-03-03 20:22:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600875', 'tblTempUsageDetail_20' ) end [2025-03-03 20:22:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600875', 'tblTempVendorCDR_20' ) start [2025-03-03 20:22:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600875', 'tblTempVendorCDR_20' ) end [2025-03-03 20:22:19] Production.INFO: ProcessCDR(1,14600875,1,1,2) [2025-03-03 20:22:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600875,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:22:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600875,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:22:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600875,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:22:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600875,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:22:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600875', 'tblTempUsageDetail_20' ) start [2025-03-03 20:22:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600875', 'tblTempUsageDetail_20' ) end [2025-03-03 20:22:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:22:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:22:22] Production.INFO: ==26325== Releasing lock... [2025-03-03 20:22:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:22:22] Production.INFO: 41.75 MB #Memory Used# [2025-03-03 20:23:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:23:06 [end_date_ymd] => 2025-03-03 20:23:06 [RateCDR] => 1 ) [2025-03-03 20: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-03 17:23:06' and `end` < '2025-03-03 20: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-03 20:23:18] Production.INFO: count ==1802 [2025-03-03 20:23:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:23:06 - End Time 2025-03-03 20:23:06 [2025-03-03 20:23:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:23:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600880', 'tblTempUsageDetail_20' ) start [2025-03-03 20:23:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600880', 'tblTempUsageDetail_20' ) end [2025-03-03 20:23:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600880', 'tblTempVendorCDR_20' ) start [2025-03-03 20:23:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600880', 'tblTempVendorCDR_20' ) end [2025-03-03 20:23:18] Production.INFO: ProcessCDR(1,14600880,1,1,2) [2025-03-03 20:23:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600880,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:23:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600880,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:23:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600880,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:23:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600880,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:23:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600880', 'tblTempUsageDetail_20' ) start [2025-03-03 20:23:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600880', 'tblTempUsageDetail_20' ) end [2025-03-03 20:23:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:23:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:23:22] Production.INFO: ==26398== Releasing lock... [2025-03-03 20:23:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:23:22] Production.INFO: 41.5 MB #Memory Used# [2025-03-03 20:24:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:24:05 [end_date_ymd] => 2025-03-03 20:24:05 [RateCDR] => 1 ) [2025-03-03 20: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-03 17:24:05' and `end` < '2025-03-03 20: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-03 20:24:17] Production.INFO: count ==1777 [2025-03-03 20:24:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:24:05 - End Time 2025-03-03 20:24:05 [2025-03-03 20:24:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600885', 'tblTempUsageDetail_20' ) start [2025-03-03 20:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600885', 'tblTempUsageDetail_20' ) end [2025-03-03 20:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600885', 'tblTempVendorCDR_20' ) start [2025-03-03 20:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600885', 'tblTempVendorCDR_20' ) end [2025-03-03 20:24:18] Production.INFO: ProcessCDR(1,14600885,1,1,2) [2025-03-03 20:24:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600885,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:24:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600885,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:24:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600885,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:24:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600885,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:24:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600885', 'tblTempUsageDetail_20' ) start [2025-03-03 20:24:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600885', 'tblTempUsageDetail_20' ) end [2025-03-03 20:24:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:24:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:24:23] Production.INFO: ==26473== Releasing lock... [2025-03-03 20:24:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:24:23] Production.INFO: 41.5 MB #Memory Used# [2025-03-03 20:25:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:25:06 [end_date_ymd] => 2025-03-03 20:25:06 [RateCDR] => 1 ) [2025-03-03 20: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-03 17:25:06' and `end` < '2025-03-03 20: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-03 20:25:18] Production.INFO: count ==1764 [2025-03-03 20:25:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:25:06 - End Time 2025-03-03 20:25:06 [2025-03-03 20:25:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600890', 'tblTempUsageDetail_20' ) start [2025-03-03 20:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600890', 'tblTempUsageDetail_20' ) end [2025-03-03 20:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600890', 'tblTempVendorCDR_20' ) start [2025-03-03 20:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600890', 'tblTempVendorCDR_20' ) end [2025-03-03 20:25:18] Production.INFO: ProcessCDR(1,14600890,1,1,2) [2025-03-03 20:25:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600890,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:25:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600890,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:25:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600890,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:25:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600890,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:25:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600890', 'tblTempUsageDetail_20' ) start [2025-03-03 20:25:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600890', 'tblTempUsageDetail_20' ) end [2025-03-03 20:25:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:25:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:25:24] Production.INFO: ==26551== Releasing lock... [2025-03-03 20:25:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:25:24] Production.INFO: 41.25 MB #Memory Used# [2025-03-03 20:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:26:05 [end_date_ymd] => 2025-03-03 20:26:05 [RateCDR] => 1 ) [2025-03-03 20:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 17:26:05' and `end` < '2025-03-03 20:26:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 20:26:18] Production.INFO: count ==1750 [2025-03-03 20:26:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:26:05 - End Time 2025-03-03 20:26:05 [2025-03-03 20:26:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600895', 'tblTempUsageDetail_20' ) start [2025-03-03 20:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600895', 'tblTempUsageDetail_20' ) end [2025-03-03 20:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600895', 'tblTempVendorCDR_20' ) start [2025-03-03 20:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600895', 'tblTempVendorCDR_20' ) end [2025-03-03 20:26:18] Production.INFO: ProcessCDR(1,14600895,1,1,2) [2025-03-03 20:26:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600895,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:26:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600895,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:26:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600895,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:26:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600895,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:26:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600895', 'tblTempUsageDetail_20' ) start [2025-03-03 20:26:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600895', 'tblTempUsageDetail_20' ) end [2025-03-03 20:26:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:26:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:26:22] Production.INFO: ==26666== Releasing lock... [2025-03-03 20:26:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:26:22] Production.INFO: 41.25 MB #Memory Used# [2025-03-03 20:27:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:27:06 [end_date_ymd] => 2025-03-03 20:27:06 [RateCDR] => 1 ) [2025-03-03 20: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-03 17:27:06' and `end` < '2025-03-03 20: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-03 20:27:19] Production.INFO: count ==1739 [2025-03-03 20:27:19] Production.ERROR: pbx CDR StartTime 2025-03-03 17:27:06 - End Time 2025-03-03 20:27:06 [2025-03-03 20:27:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:27:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600900', 'tblTempUsageDetail_20' ) start [2025-03-03 20:27:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600900', 'tblTempUsageDetail_20' ) end [2025-03-03 20:27:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600900', 'tblTempVendorCDR_20' ) start [2025-03-03 20:27:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600900', 'tblTempVendorCDR_20' ) end [2025-03-03 20:27:19] Production.INFO: ProcessCDR(1,14600900,1,1,2) [2025-03-03 20:27:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600900,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:27:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600900,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:27:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600900,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:27:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600900,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:27:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600900', 'tblTempUsageDetail_20' ) start [2025-03-03 20:27:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600900', 'tblTempUsageDetail_20' ) end [2025-03-03 20:27:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:27:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:27:24] Production.INFO: ==26742== Releasing lock... [2025-03-03 20:27:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:27:24] Production.INFO: 40.75 MB #Memory Used# [2025-03-03 20:28:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:28:06 [end_date_ymd] => 2025-03-03 20:28:06 [RateCDR] => 1 ) [2025-03-03 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-03 17:28:06' and `end` < '2025-03-03 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-03 20:28:18] Production.INFO: count ==1736 [2025-03-03 20:28:19] Production.ERROR: pbx CDR StartTime 2025-03-03 17:28:06 - End Time 2025-03-03 20:28:06 [2025-03-03 20:28:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:28:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600905', 'tblTempUsageDetail_20' ) start [2025-03-03 20:28:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600905', 'tblTempUsageDetail_20' ) end [2025-03-03 20:28:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600905', 'tblTempVendorCDR_20' ) start [2025-03-03 20:28:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600905', 'tblTempVendorCDR_20' ) end [2025-03-03 20:28:19] Production.INFO: ProcessCDR(1,14600905,1,1,2) [2025-03-03 20:28:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600905,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:28:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600905,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:28:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600905,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:28:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600905,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:28:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600905', 'tblTempUsageDetail_20' ) start [2025-03-03 20:28:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600905', 'tblTempUsageDetail_20' ) end [2025-03-03 20:28:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:28:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:28:22] Production.INFO: ==26814== Releasing lock... [2025-03-03 20:28:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:28:22] Production.INFO: 41 MB #Memory Used# [2025-03-03 20:29:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:29:06 [end_date_ymd] => 2025-03-03 20:29:06 [RateCDR] => 1 ) [2025-03-03 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-03 17:29:06' and `end` < '2025-03-03 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-03 20:29:18] Production.INFO: count ==1737 [2025-03-03 20:29:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:29:06 - End Time 2025-03-03 20:29:06 [2025-03-03 20:29:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600910', 'tblTempUsageDetail_20' ) start [2025-03-03 20:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600910', 'tblTempUsageDetail_20' ) end [2025-03-03 20:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600910', 'tblTempVendorCDR_20' ) start [2025-03-03 20:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600910', 'tblTempVendorCDR_20' ) end [2025-03-03 20:29:18] Production.INFO: ProcessCDR(1,14600910,1,1,2) [2025-03-03 20:29:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600910,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:29:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600910,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:29:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600910,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:29:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600910,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:29:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600910', 'tblTempUsageDetail_20' ) start [2025-03-03 20:29:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600910', 'tblTempUsageDetail_20' ) end [2025-03-03 20:29:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:29:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:29:22] Production.INFO: ==26895== Releasing lock... [2025-03-03 20:29:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:29:22] Production.INFO: 41 MB #Memory Used# [2025-03-03 20:30:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:30:06 [end_date_ymd] => 2025-03-03 20:30:06 [RateCDR] => 1 ) [2025-03-03 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-03 17:30:06' and `end` < '2025-03-03 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-03 20:30:18] Production.INFO: count ==1735 [2025-03-03 20:30:19] Production.ERROR: pbx CDR StartTime 2025-03-03 17:30:06 - End Time 2025-03-03 20:30:06 [2025-03-03 20:30:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:30:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600916', 'tblTempUsageDetail_20' ) start [2025-03-03 20:30:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600916', 'tblTempUsageDetail_20' ) end [2025-03-03 20:30:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600916', 'tblTempVendorCDR_20' ) start [2025-03-03 20:30:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600916', 'tblTempVendorCDR_20' ) end [2025-03-03 20:30:19] Production.INFO: ProcessCDR(1,14600916,1,1,2) [2025-03-03 20:30:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600916,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:30:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600916,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:30:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600916,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:30:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600916,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:30:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600916', 'tblTempUsageDetail_20' ) start [2025-03-03 20:30:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600916', 'tblTempUsageDetail_20' ) end [2025-03-03 20:30:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:30:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:30:23] Production.INFO: ==26974== Releasing lock... [2025-03-03 20:30:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:30:23] Production.INFO: 41 MB #Memory Used# [2025-03-03 20:31:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:31:06 [end_date_ymd] => 2025-03-03 20:31:06 [RateCDR] => 1 ) [2025-03-03 20: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-03 17:31:06' and `end` < '2025-03-03 20: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-03 20:31:18] Production.INFO: count ==1697 [2025-03-03 20:31:19] Production.ERROR: pbx CDR StartTime 2025-03-03 17:31:06 - End Time 2025-03-03 20:31:06 [2025-03-03 20:31:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:31:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600921', 'tblTempUsageDetail_20' ) start [2025-03-03 20:31:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600921', 'tblTempUsageDetail_20' ) end [2025-03-03 20:31:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600921', 'tblTempVendorCDR_20' ) start [2025-03-03 20:31:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600921', 'tblTempVendorCDR_20' ) end [2025-03-03 20:31:19] Production.INFO: ProcessCDR(1,14600921,1,1,2) [2025-03-03 20:31:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600921,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:31:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600921,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:31:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600921,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:31:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600921,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:31:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600921', 'tblTempUsageDetail_20' ) start [2025-03-03 20:31:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600921', 'tblTempUsageDetail_20' ) end [2025-03-03 20:31:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:31:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:31:23] Production.INFO: ==27051== Releasing lock... [2025-03-03 20:31:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:31:23] Production.INFO: 40.75 MB #Memory Used# [2025-03-03 20:32:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:32:06 [end_date_ymd] => 2025-03-03 20:32:06 [RateCDR] => 1 ) [2025-03-03 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-03 17:32:06' and `end` < '2025-03-03 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-03 20:32:18] Production.INFO: count ==1664 [2025-03-03 20:32:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:32:06 - End Time 2025-03-03 20:32:06 [2025-03-03 20:32:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:32:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600926', 'tblTempUsageDetail_20' ) start [2025-03-03 20:32:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600926', 'tblTempUsageDetail_20' ) end [2025-03-03 20:32:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600926', 'tblTempVendorCDR_20' ) start [2025-03-03 20:32:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600926', 'tblTempVendorCDR_20' ) end [2025-03-03 20:32:18] Production.INFO: ProcessCDR(1,14600926,1,1,2) [2025-03-03 20:32:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600926,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:32:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600926,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:32:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600926,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:32:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600926,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:32:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600926', 'tblTempUsageDetail_20' ) start [2025-03-03 20:32:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600926', 'tblTempUsageDetail_20' ) end [2025-03-03 20:32:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:32:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:32:24] Production.INFO: ==27125== Releasing lock... [2025-03-03 20:32:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:32:24] Production.INFO: 40.25 MB #Memory Used# [2025-03-03 20:33:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:33:06 [end_date_ymd] => 2025-03-03 20:33:06 [RateCDR] => 1 ) [2025-03-03 20: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-03 17:33:06' and `end` < '2025-03-03 20: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-03 20:33:18] Production.INFO: count ==1647 [2025-03-03 20:33:19] Production.ERROR: pbx CDR StartTime 2025-03-03 17:33:06 - End Time 2025-03-03 20:33:06 [2025-03-03 20:33:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:33:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600931', 'tblTempUsageDetail_20' ) start [2025-03-03 20:33:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600931', 'tblTempUsageDetail_20' ) end [2025-03-03 20:33:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600931', 'tblTempVendorCDR_20' ) start [2025-03-03 20:33:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600931', 'tblTempVendorCDR_20' ) end [2025-03-03 20:33:19] Production.INFO: ProcessCDR(1,14600931,1,1,2) [2025-03-03 20:33:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600931,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:33:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600931,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:33:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600931,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:33:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600931,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:33:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600931', 'tblTempUsageDetail_20' ) start [2025-03-03 20:33:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600931', 'tblTempUsageDetail_20' ) end [2025-03-03 20:33:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:33:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:33:22] Production.INFO: ==27199== Releasing lock... [2025-03-03 20:33:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:33:22] Production.INFO: 40.25 MB #Memory Used# [2025-03-03 20:34:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:34:06 [end_date_ymd] => 2025-03-03 20:34:06 [RateCDR] => 1 ) [2025-03-03 20:34:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 17:34:06' and `end` < '2025-03-03 20:34:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 20:34:18] Production.INFO: count ==1637 [2025-03-03 20:34:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:34:06 - End Time 2025-03-03 20:34:06 [2025-03-03 20:34:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600936', 'tblTempUsageDetail_20' ) start [2025-03-03 20:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600936', 'tblTempUsageDetail_20' ) end [2025-03-03 20:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600936', 'tblTempVendorCDR_20' ) start [2025-03-03 20:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600936', 'tblTempVendorCDR_20' ) end [2025-03-03 20:34:18] Production.INFO: ProcessCDR(1,14600936,1,1,2) [2025-03-03 20:34:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600936,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:34:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600936,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:34:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600936,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:34:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600936,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:34:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600936', 'tblTempUsageDetail_20' ) start [2025-03-03 20:34:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600936', 'tblTempUsageDetail_20' ) end [2025-03-03 20:34:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:34:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:34:22] Production.INFO: ==27274== Releasing lock... [2025-03-03 20:34:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:34:22] Production.INFO: 40.5 MB #Memory Used# [2025-03-03 20:35:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:35:06 [end_date_ymd] => 2025-03-03 20:35:06 [RateCDR] => 1 ) [2025-03-03 20: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-03 17:35:06' and `end` < '2025-03-03 20: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-03 20:35:18] Production.INFO: count ==1634 [2025-03-03 20:35:19] Production.ERROR: pbx CDR StartTime 2025-03-03 17:35:06 - End Time 2025-03-03 20:35:06 [2025-03-03 20:35:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:35:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600941', 'tblTempUsageDetail_20' ) start [2025-03-03 20:35:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600941', 'tblTempUsageDetail_20' ) end [2025-03-03 20:35:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600941', 'tblTempVendorCDR_20' ) start [2025-03-03 20:35:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600941', 'tblTempVendorCDR_20' ) end [2025-03-03 20:35:19] Production.INFO: ProcessCDR(1,14600941,1,1,2) [2025-03-03 20:35:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600941,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:35:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600941,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:35:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600941,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:35:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600941,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:35:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600941', 'tblTempUsageDetail_20' ) start [2025-03-03 20:35:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600941', 'tblTempUsageDetail_20' ) end [2025-03-03 20:35:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:35:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:35:23] Production.INFO: ==27352== Releasing lock... [2025-03-03 20:35:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:35:23] Production.INFO: 40.25 MB #Memory Used# [2025-03-03 20:36:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:36:05 [end_date_ymd] => 2025-03-03 20:36:05 [RateCDR] => 1 ) [2025-03-03 20:36:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 17:36:05' and `end` < '2025-03-03 20:36:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 20:36:18] Production.INFO: count ==1636 [2025-03-03 20:36:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:36:05 - End Time 2025-03-03 20:36:05 [2025-03-03 20:36:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:36:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600946', 'tblTempUsageDetail_20' ) start [2025-03-03 20:36:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600946', 'tblTempUsageDetail_20' ) end [2025-03-03 20:36:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600946', 'tblTempVendorCDR_20' ) start [2025-03-03 20:36:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600946', 'tblTempVendorCDR_20' ) end [2025-03-03 20:36:18] Production.INFO: ProcessCDR(1,14600946,1,1,2) [2025-03-03 20:36:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600946,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:36:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600946,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:36:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600946,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:36:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600946,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:36:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600946', 'tblTempUsageDetail_20' ) start [2025-03-03 20:36:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600946', 'tblTempUsageDetail_20' ) end [2025-03-03 20:36:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:36:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:36:23] Production.INFO: ==27423== Releasing lock... [2025-03-03 20:36:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:36:23] Production.INFO: 40.5 MB #Memory Used# [2025-03-03 20:37:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:37:05 [end_date_ymd] => 2025-03-03 20:37:05 [RateCDR] => 1 ) [2025-03-03 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-03 17:37:05' and `end` < '2025-03-03 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-03 20:37:17] Production.INFO: count ==1635 [2025-03-03 20:37:17] Production.ERROR: pbx CDR StartTime 2025-03-03 17:37:05 - End Time 2025-03-03 20:37:05 [2025-03-03 20:37:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600951', 'tblTempUsageDetail_20' ) start [2025-03-03 20:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600951', 'tblTempUsageDetail_20' ) end [2025-03-03 20:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600951', 'tblTempVendorCDR_20' ) start [2025-03-03 20:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600951', 'tblTempVendorCDR_20' ) end [2025-03-03 20:37:17] Production.INFO: ProcessCDR(1,14600951,1,1,2) [2025-03-03 20:37:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600951,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:37:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600951,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:37:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600951,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:37:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600951,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:37:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600951', 'tblTempUsageDetail_20' ) start [2025-03-03 20:37:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600951', 'tblTempUsageDetail_20' ) end [2025-03-03 20:37:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:37:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:37:23] Production.INFO: ==27497== Releasing lock... [2025-03-03 20:37:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:37:23] Production.INFO: 40.5 MB #Memory Used# [2025-03-03 20:38:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:38:06 [end_date_ymd] => 2025-03-03 20:38:06 [RateCDR] => 1 ) [2025-03-03 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-03 17:38:06' and `end` < '2025-03-03 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-03 20:38:18] Production.INFO: count ==1630 [2025-03-03 20:38:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:38:06 - End Time 2025-03-03 20:38:06 [2025-03-03 20:38:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600956', 'tblTempUsageDetail_20' ) start [2025-03-03 20:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600956', 'tblTempUsageDetail_20' ) end [2025-03-03 20:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600956', 'tblTempVendorCDR_20' ) start [2025-03-03 20:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600956', 'tblTempVendorCDR_20' ) end [2025-03-03 20:38:18] Production.INFO: ProcessCDR(1,14600956,1,1,2) [2025-03-03 20:38:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600956,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:38:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600956,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:38:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600956,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:38:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600956,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:38:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600956', 'tblTempUsageDetail_20' ) start [2025-03-03 20:38:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600956', 'tblTempUsageDetail_20' ) end [2025-03-03 20:38:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:38:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:38:22] Production.INFO: ==27572== Releasing lock... [2025-03-03 20:38:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:38:22] Production.INFO: 40 MB #Memory Used# [2025-03-03 20:39:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:39:05 [end_date_ymd] => 2025-03-03 20:39:05 [RateCDR] => 1 ) [2025-03-03 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-03 17:39:05' and `end` < '2025-03-03 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-03 20:39:17] Production.INFO: count ==1623 [2025-03-03 20:39:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:39:05 - End Time 2025-03-03 20:39:05 [2025-03-03 20:39:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600961', 'tblTempUsageDetail_20' ) start [2025-03-03 20:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600961', 'tblTempUsageDetail_20' ) end [2025-03-03 20:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600961', 'tblTempVendorCDR_20' ) start [2025-03-03 20:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600961', 'tblTempVendorCDR_20' ) end [2025-03-03 20:39:18] Production.INFO: ProcessCDR(1,14600961,1,1,2) [2025-03-03 20:39:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600961,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:39:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600961,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:39:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600961,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:39:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600961,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:39:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600961', 'tblTempUsageDetail_20' ) start [2025-03-03 20:39:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600961', 'tblTempUsageDetail_20' ) end [2025-03-03 20:39:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:39:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:39:21] Production.INFO: ==27643== Releasing lock... [2025-03-03 20:39:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:39:21] Production.INFO: 40.25 MB #Memory Used# [2025-03-03 20:40:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:40:07 [end_date_ymd] => 2025-03-03 20:40:07 [RateCDR] => 1 ) [2025-03-03 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-03 17:40:07' and `end` < '2025-03-03 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-03 20:40:19] Production.INFO: count ==1617 [2025-03-03 20:40:19] Production.ERROR: pbx CDR StartTime 2025-03-03 17:40:07 - End Time 2025-03-03 20:40:07 [2025-03-03 20:40:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600967', 'tblTempUsageDetail_20' ) start [2025-03-03 20:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600967', 'tblTempUsageDetail_20' ) end [2025-03-03 20:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600967', 'tblTempVendorCDR_20' ) start [2025-03-03 20:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600967', 'tblTempVendorCDR_20' ) end [2025-03-03 20:40:19] Production.INFO: ProcessCDR(1,14600967,1,1,2) [2025-03-03 20:40:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600967,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:40:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600967,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:40:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600967,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:40:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600967,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:40:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600967', 'tblTempUsageDetail_20' ) start [2025-03-03 20:40:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600967', 'tblTempUsageDetail_20' ) end [2025-03-03 20:40:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:40:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:40:23] Production.INFO: ==27719== Releasing lock... [2025-03-03 20:40:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:40:23] Production.INFO: 40.25 MB #Memory Used# [2025-03-03 20:41:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:41:05 [end_date_ymd] => 2025-03-03 20:41:05 [RateCDR] => 1 ) [2025-03-03 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-03 17:41:05' and `end` < '2025-03-03 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-03 20:41:18] Production.INFO: count ==1555 [2025-03-03 20:41:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:41:05 - End Time 2025-03-03 20:41:05 [2025-03-03 20:41:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600972', 'tblTempUsageDetail_20' ) start [2025-03-03 20:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600972', 'tblTempUsageDetail_20' ) end [2025-03-03 20:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600972', 'tblTempVendorCDR_20' ) start [2025-03-03 20:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600972', 'tblTempVendorCDR_20' ) end [2025-03-03 20:41:18] Production.INFO: ProcessCDR(1,14600972,1,1,2) [2025-03-03 20:41:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600972,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:41:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600972,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:41:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600972,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:41:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600972,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:41:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600972', 'tblTempUsageDetail_20' ) start [2025-03-03 20:41:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600972', 'tblTempUsageDetail_20' ) end [2025-03-03 20:41:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:41:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:41:22] Production.INFO: ==27797== Releasing lock... [2025-03-03 20:41:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:41:22] Production.INFO: 39.75 MB #Memory Used# [2025-03-03 20:42:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:42:06 [end_date_ymd] => 2025-03-03 20:42:06 [RateCDR] => 1 ) [2025-03-03 20: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-03 17:42:06' and `end` < '2025-03-03 20: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-03 20:42:18] Production.INFO: count ==1550 [2025-03-03 20:42:19] Production.ERROR: pbx CDR StartTime 2025-03-03 17:42:06 - End Time 2025-03-03 20:42:06 [2025-03-03 20:42:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:42:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600977', 'tblTempUsageDetail_20' ) start [2025-03-03 20:42:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600977', 'tblTempUsageDetail_20' ) end [2025-03-03 20:42:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600977', 'tblTempVendorCDR_20' ) start [2025-03-03 20:42:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600977', 'tblTempVendorCDR_20' ) end [2025-03-03 20:42:19] Production.INFO: ProcessCDR(1,14600977,1,1,2) [2025-03-03 20:42:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600977,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:42:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600977,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:42:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600977,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:42:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600977,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:42:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600977', 'tblTempUsageDetail_20' ) start [2025-03-03 20:42:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600977', 'tblTempUsageDetail_20' ) end [2025-03-03 20:42:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:42:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:42:22] Production.INFO: ==27914== Releasing lock... [2025-03-03 20:42:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:42:22] Production.INFO: 39.5 MB #Memory Used# [2025-03-03 20:43:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:43:06 [end_date_ymd] => 2025-03-03 20:43:06 [RateCDR] => 1 ) [2025-03-03 20: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-03 17:43:06' and `end` < '2025-03-03 20: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-03 20:43:18] Production.INFO: count ==1538 [2025-03-03 20:43:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:43:06 - End Time 2025-03-03 20:43:06 [2025-03-03 20:43:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600982', 'tblTempUsageDetail_20' ) start [2025-03-03 20:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600982', 'tblTempUsageDetail_20' ) end [2025-03-03 20:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600982', 'tblTempVendorCDR_20' ) start [2025-03-03 20:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600982', 'tblTempVendorCDR_20' ) end [2025-03-03 20:43:18] Production.INFO: ProcessCDR(1,14600982,1,1,2) [2025-03-03 20:43:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600982,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:43:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600982,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:43:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600982,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:43:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600982,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:43:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600982', 'tblTempUsageDetail_20' ) start [2025-03-03 20:43:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600982', 'tblTempUsageDetail_20' ) end [2025-03-03 20:43:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:43:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:43:24] Production.INFO: ==27991== Releasing lock... [2025-03-03 20:43:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:43:24] Production.INFO: 39.5 MB #Memory Used# [2025-03-03 20:44:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:44:06 [end_date_ymd] => 2025-03-03 20:44:06 [RateCDR] => 1 ) [2025-03-03 20: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-03 17:44:06' and `end` < '2025-03-03 20: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-03 20:44:18] Production.INFO: count ==1531 [2025-03-03 20:44:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:44:06 - End Time 2025-03-03 20:44:06 [2025-03-03 20:44:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600987', 'tblTempUsageDetail_20' ) start [2025-03-03 20:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600987', 'tblTempUsageDetail_20' ) end [2025-03-03 20:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600987', 'tblTempVendorCDR_20' ) start [2025-03-03 20:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600987', 'tblTempVendorCDR_20' ) end [2025-03-03 20:44:18] Production.INFO: ProcessCDR(1,14600987,1,1,2) [2025-03-03 20:44:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600987,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:44:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600987,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:44:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600987,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:44:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600987,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:44:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600987', 'tblTempUsageDetail_20' ) start [2025-03-03 20:44:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600987', 'tblTempUsageDetail_20' ) end [2025-03-03 20:44:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:44:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:44:24] Production.INFO: ==28073== Releasing lock... [2025-03-03 20:44:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:44:24] Production.INFO: 39.5 MB #Memory Used# [2025-03-03 20:45:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:45:06 [end_date_ymd] => 2025-03-03 20:45:06 [RateCDR] => 1 ) [2025-03-03 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-03 17:45:06' and `end` < '2025-03-03 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-03 20:45:18] Production.INFO: count ==1531 [2025-03-03 20:45:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:45:06 - End Time 2025-03-03 20:45:06 [2025-03-03 20:45:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:45:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600992', 'tblTempUsageDetail_20' ) start [2025-03-03 20:45:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600992', 'tblTempUsageDetail_20' ) end [2025-03-03 20:45:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600992', 'tblTempVendorCDR_20' ) start [2025-03-03 20:45:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600992', 'tblTempVendorCDR_20' ) end [2025-03-03 20:45:18] Production.INFO: ProcessCDR(1,14600992,1,1,2) [2025-03-03 20:45:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600992,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:45:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600992,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:45:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600992,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:45:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600992,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:45:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600992', 'tblTempUsageDetail_20' ) start [2025-03-03 20:45:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600992', 'tblTempUsageDetail_20' ) end [2025-03-03 20:45:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:45:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:45:24] Production.INFO: ==28150== Releasing lock... [2025-03-03 20:45:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:45:24] Production.INFO: 39.5 MB #Memory Used# [2025-03-03 20:46:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:46:06 [end_date_ymd] => 2025-03-03 20:46:06 [RateCDR] => 1 ) [2025-03-03 20: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-03 17:46:06' and `end` < '2025-03-03 20: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-03 20:46:18] Production.INFO: count ==1537 [2025-03-03 20:46:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:46:06 - End Time 2025-03-03 20:46:06 [2025-03-03 20:46:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600997', 'tblTempUsageDetail_20' ) start [2025-03-03 20:46:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14600997', 'tblTempUsageDetail_20' ) end [2025-03-03 20:46:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600997', 'tblTempVendorCDR_20' ) start [2025-03-03 20:46:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14600997', 'tblTempVendorCDR_20' ) end [2025-03-03 20:46:19] Production.INFO: ProcessCDR(1,14600997,1,1,2) [2025-03-03 20:46:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14600997,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:46:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14600997,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:46:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14600997,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:46:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14600997,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:46:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600997', 'tblTempUsageDetail_20' ) start [2025-03-03 20:46:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14600997', 'tblTempUsageDetail_20' ) end [2025-03-03 20:46:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:46:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:46:23] Production.INFO: ==28222== Releasing lock... [2025-03-03 20:46:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:46:23] Production.INFO: 39.5 MB #Memory Used# [2025-03-03 20:47:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:47:06 [end_date_ymd] => 2025-03-03 20:47:06 [RateCDR] => 1 ) [2025-03-03 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-03 17:47:06' and `end` < '2025-03-03 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-03 20:47:18] Production.INFO: count ==1534 [2025-03-03 20:47:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:47:06 - End Time 2025-03-03 20:47:06 [2025-03-03 20:47:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601002', 'tblTempUsageDetail_20' ) start [2025-03-03 20:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601002', 'tblTempUsageDetail_20' ) end [2025-03-03 20:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601002', 'tblTempVendorCDR_20' ) start [2025-03-03 20:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601002', 'tblTempVendorCDR_20' ) end [2025-03-03 20:47:18] Production.INFO: ProcessCDR(1,14601002,1,1,2) [2025-03-03 20:47:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601002,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:47:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601002,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:47:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601002,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:47:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601002,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:47:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601002', 'tblTempUsageDetail_20' ) start [2025-03-03 20:47:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601002', 'tblTempUsageDetail_20' ) end [2025-03-03 20:47:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:47:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:47:22] Production.INFO: ==28296== Releasing lock... [2025-03-03 20:47:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:47:22] Production.INFO: 39.5 MB #Memory Used# [2025-03-03 20:48:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:48:06 [end_date_ymd] => 2025-03-03 20:48:06 [RateCDR] => 1 ) [2025-03-03 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-03 17:48:06' and `end` < '2025-03-03 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-03 20:48:18] Production.INFO: count ==1534 [2025-03-03 20:48:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:48:06 - End Time 2025-03-03 20:48:06 [2025-03-03 20:48:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601007', 'tblTempUsageDetail_20' ) start [2025-03-03 20:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601007', 'tblTempUsageDetail_20' ) end [2025-03-03 20:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601007', 'tblTempVendorCDR_20' ) start [2025-03-03 20:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601007', 'tblTempVendorCDR_20' ) end [2025-03-03 20:48:18] Production.INFO: ProcessCDR(1,14601007,1,1,2) [2025-03-03 20:48:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601007,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:48:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601007,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:48:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601007,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:48:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601007,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:48:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601007', 'tblTempUsageDetail_20' ) start [2025-03-03 20:48:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601007', 'tblTempUsageDetail_20' ) end [2025-03-03 20:48:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:48:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:48:22] Production.INFO: ==28374== Releasing lock... [2025-03-03 20:48:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:48:22] Production.INFO: 39.5 MB #Memory Used# [2025-03-03 20:49:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:49:06 [end_date_ymd] => 2025-03-03 20:49:06 [RateCDR] => 1 ) [2025-03-03 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-03 17:49:06' and `end` < '2025-03-03 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-03 20:49:18] Production.INFO: count ==1522 [2025-03-03 20:49:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:49:06 - End Time 2025-03-03 20:49:06 [2025-03-03 20:49:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601012', 'tblTempUsageDetail_20' ) start [2025-03-03 20:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601012', 'tblTempUsageDetail_20' ) end [2025-03-03 20:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601012', 'tblTempVendorCDR_20' ) start [2025-03-03 20:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601012', 'tblTempVendorCDR_20' ) end [2025-03-03 20:49:18] Production.INFO: ProcessCDR(1,14601012,1,1,2) [2025-03-03 20:49:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601012,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:49:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601012,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:49:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601012,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:49:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601012,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:49:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601012', 'tblTempUsageDetail_20' ) start [2025-03-03 20:49:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601012', 'tblTempUsageDetail_20' ) end [2025-03-03 20:49:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:49:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:49:22] Production.INFO: ==28449== Releasing lock... [2025-03-03 20:49:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:49:22] Production.INFO: 39.5 MB #Memory Used# [2025-03-03 20:50:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:50:07 [end_date_ymd] => 2025-03-03 20:50:07 [RateCDR] => 1 ) [2025-03-03 20:50:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 17:50:07' and `end` < '2025-03-03 20:50:07' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 20:50:19] Production.INFO: count ==1523 [2025-03-03 20:50:19] Production.ERROR: pbx CDR StartTime 2025-03-03 17:50:07 - End Time 2025-03-03 20:50:07 [2025-03-03 20:50:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601018', 'tblTempUsageDetail_20' ) start [2025-03-03 20:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601018', 'tblTempUsageDetail_20' ) end [2025-03-03 20:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601018', 'tblTempVendorCDR_20' ) start [2025-03-03 20:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601018', 'tblTempVendorCDR_20' ) end [2025-03-03 20:50:19] Production.INFO: ProcessCDR(1,14601018,1,1,2) [2025-03-03 20:50:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601018,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:50:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601018,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:50:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601018,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:50:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601018,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:50:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601018', 'tblTempUsageDetail_20' ) start [2025-03-03 20:50:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601018', 'tblTempUsageDetail_20' ) end [2025-03-03 20:50:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:50:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:50:23] Production.INFO: ==28523== Releasing lock... [2025-03-03 20:50:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:50:23] Production.INFO: 39.5 MB #Memory Used# [2025-03-03 20:51:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:51:05 [end_date_ymd] => 2025-03-03 20:51:05 [RateCDR] => 1 ) [2025-03-03 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-03 17:51:05' and `end` < '2025-03-03 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-03 20:51:17] Production.INFO: count ==1439 [2025-03-03 20:51:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:51:05 - End Time 2025-03-03 20:51:05 [2025-03-03 20:51:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601023', 'tblTempUsageDetail_20' ) start [2025-03-03 20:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601023', 'tblTempUsageDetail_20' ) end [2025-03-03 20:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601023', 'tblTempVendorCDR_20' ) start [2025-03-03 20:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601023', 'tblTempVendorCDR_20' ) end [2025-03-03 20:51:18] Production.INFO: ProcessCDR(1,14601023,1,1,2) [2025-03-03 20:51:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601023,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:51:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601023,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:51:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601023,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:51:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601023,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:51:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601023', 'tblTempUsageDetail_20' ) start [2025-03-03 20:51:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601023', 'tblTempUsageDetail_20' ) end [2025-03-03 20:51:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:51:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:51:21] Production.INFO: ==28599== Releasing lock... [2025-03-03 20:51:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:51:21] Production.INFO: 38.75 MB #Memory Used# [2025-03-03 20:52:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:52:06 [end_date_ymd] => 2025-03-03 20:52:06 [RateCDR] => 1 ) [2025-03-03 20:52:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 17:52:06' and `end` < '2025-03-03 20:52:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 20:52:18] Production.INFO: count ==1432 [2025-03-03 20:52:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:52:06 - End Time 2025-03-03 20:52:06 [2025-03-03 20:52:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601028', 'tblTempUsageDetail_20' ) start [2025-03-03 20:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601028', 'tblTempUsageDetail_20' ) end [2025-03-03 20:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601028', 'tblTempVendorCDR_20' ) start [2025-03-03 20:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601028', 'tblTempVendorCDR_20' ) end [2025-03-03 20:52:18] Production.INFO: ProcessCDR(1,14601028,1,1,2) [2025-03-03 20:52:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601028,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:52:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601028,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:52:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601028,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:52:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601028,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:52:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601028', 'tblTempUsageDetail_20' ) start [2025-03-03 20:52:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601028', 'tblTempUsageDetail_20' ) end [2025-03-03 20:52:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:52:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:52:24] Production.INFO: ==28670== Releasing lock... [2025-03-03 20:52:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:52:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-03 20:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:53:05 [end_date_ymd] => 2025-03-03 20:53:05 [RateCDR] => 1 ) [2025-03-03 20:53:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 17:53:05' and `end` < '2025-03-03 20:53:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 20:53:17] Production.INFO: count ==1431 [2025-03-03 20:53:17] Production.ERROR: pbx CDR StartTime 2025-03-03 17:53:05 - End Time 2025-03-03 20:53:05 [2025-03-03 20:53:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601033', 'tblTempUsageDetail_20' ) start [2025-03-03 20:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601033', 'tblTempUsageDetail_20' ) end [2025-03-03 20:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601033', 'tblTempVendorCDR_20' ) start [2025-03-03 20:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601033', 'tblTempVendorCDR_20' ) end [2025-03-03 20:53:17] Production.INFO: ProcessCDR(1,14601033,1,1,2) [2025-03-03 20:53:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601033,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:53:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601033,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:53:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601033,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:53:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601033,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:53:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601033', 'tblTempUsageDetail_20' ) start [2025-03-03 20:53:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601033', 'tblTempUsageDetail_20' ) end [2025-03-03 20:53:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:53:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:53:23] Production.INFO: ==28742== Releasing lock... [2025-03-03 20:53:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:53:23] Production.INFO: 38.75 MB #Memory Used# [2025-03-03 20:54:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:54:06 [end_date_ymd] => 2025-03-03 20:54:06 [RateCDR] => 1 ) [2025-03-03 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-03 17:54:06' and `end` < '2025-03-03 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-03 20:54:18] Production.INFO: count ==1427 [2025-03-03 20:54:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:54:06 - End Time 2025-03-03 20:54:06 [2025-03-03 20:54:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601038', 'tblTempUsageDetail_20' ) start [2025-03-03 20:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601038', 'tblTempUsageDetail_20' ) end [2025-03-03 20:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601038', 'tblTempVendorCDR_20' ) start [2025-03-03 20:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601038', 'tblTempVendorCDR_20' ) end [2025-03-03 20:54:18] Production.INFO: ProcessCDR(1,14601038,1,1,2) [2025-03-03 20:54:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601038,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:54:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601038,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:54:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601038,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:54:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601038,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:54:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601038', 'tblTempUsageDetail_20' ) start [2025-03-03 20:54:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601038', 'tblTempUsageDetail_20' ) end [2025-03-03 20:54:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:54:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:54:22] Production.INFO: ==28814== Releasing lock... [2025-03-03 20:54:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:54:22] Production.INFO: 39 MB #Memory Used# [2025-03-03 20:55:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:55:06 [end_date_ymd] => 2025-03-03 20:55:06 [RateCDR] => 1 ) [2025-03-03 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-03 17:55:06' and `end` < '2025-03-03 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-03 20:55:18] Production.INFO: count ==1423 [2025-03-03 20:55:19] Production.ERROR: pbx CDR StartTime 2025-03-03 17:55:06 - End Time 2025-03-03 20:55:06 [2025-03-03 20:55:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:55:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601043', 'tblTempUsageDetail_20' ) start [2025-03-03 20:55:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601043', 'tblTempUsageDetail_20' ) end [2025-03-03 20:55:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601043', 'tblTempVendorCDR_20' ) start [2025-03-03 20:55:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601043', 'tblTempVendorCDR_20' ) end [2025-03-03 20:55:19] Production.INFO: ProcessCDR(1,14601043,1,1,2) [2025-03-03 20:55:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601043,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:55:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601043,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:55:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601043,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:55:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601043,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:55:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601043', 'tblTempUsageDetail_20' ) start [2025-03-03 20:55:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601043', 'tblTempUsageDetail_20' ) end [2025-03-03 20:55:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:55:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:55:22] Production.INFO: ==28887== Releasing lock... [2025-03-03 20:55:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:55:22] Production.INFO: 39 MB #Memory Used# [2025-03-03 20:56:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:56:06 [end_date_ymd] => 2025-03-03 20:56:06 [RateCDR] => 1 ) [2025-03-03 20: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-03 17:56:06' and `end` < '2025-03-03 20: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-03 20:56:18] Production.INFO: count ==1421 [2025-03-03 20:56:19] Production.ERROR: pbx CDR StartTime 2025-03-03 17:56:06 - End Time 2025-03-03 20:56:06 [2025-03-03 20:56:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:56:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601048', 'tblTempUsageDetail_20' ) start [2025-03-03 20:56:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601048', 'tblTempUsageDetail_20' ) end [2025-03-03 20:56:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601048', 'tblTempVendorCDR_20' ) start [2025-03-03 20:56:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601048', 'tblTempVendorCDR_20' ) end [2025-03-03 20:56:19] Production.INFO: ProcessCDR(1,14601048,1,1,2) [2025-03-03 20:56:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601048,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:56:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601048,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:56:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601048,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:56:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601048,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:56:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601048', 'tblTempUsageDetail_20' ) start [2025-03-03 20:56:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601048', 'tblTempUsageDetail_20' ) end [2025-03-03 20:56:24] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:56:24] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:56:24] Production.INFO: ==28963== Releasing lock... [2025-03-03 20:56:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:56:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-03 20:57:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:57:05 [end_date_ymd] => 2025-03-03 20:57:05 [RateCDR] => 1 ) [2025-03-03 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-03 17:57:05' and `end` < '2025-03-03 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-03 20:57:18] Production.INFO: count ==1413 [2025-03-03 20:57:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:57:05 - End Time 2025-03-03 20:57:05 [2025-03-03 20:57:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601053', 'tblTempUsageDetail_20' ) start [2025-03-03 20:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601053', 'tblTempUsageDetail_20' ) end [2025-03-03 20:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601053', 'tblTempVendorCDR_20' ) start [2025-03-03 20:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601053', 'tblTempVendorCDR_20' ) end [2025-03-03 20:57:18] Production.INFO: ProcessCDR(1,14601053,1,1,2) [2025-03-03 20:57:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601053,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:57:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601053,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:57:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601053,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:57:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601053,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:57:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601053', 'tblTempUsageDetail_20' ) start [2025-03-03 20:57:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601053', 'tblTempUsageDetail_20' ) end [2025-03-03 20:57:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:57:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:57:23] Production.INFO: ==29072== Releasing lock... [2025-03-03 20:57:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:57:23] Production.INFO: 38.5 MB #Memory Used# [2025-03-03 20:58:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:58:06 [end_date_ymd] => 2025-03-03 20:58:06 [RateCDR] => 1 ) [2025-03-03 20:58:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 17:58:06' and `end` < '2025-03-03 20: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-03 20:58:18] Production.INFO: count ==1413 [2025-03-03 20:58:18] Production.ERROR: pbx CDR StartTime 2025-03-03 17:58:06 - End Time 2025-03-03 20:58:06 [2025-03-03 20:58:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601058', 'tblTempUsageDetail_20' ) start [2025-03-03 20:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601058', 'tblTempUsageDetail_20' ) end [2025-03-03 20:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601058', 'tblTempVendorCDR_20' ) start [2025-03-03 20:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601058', 'tblTempVendorCDR_20' ) end [2025-03-03 20:58:18] Production.INFO: ProcessCDR(1,14601058,1,1,2) [2025-03-03 20:58:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601058,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:58:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601058,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:58:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601058,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:58:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601058,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:58:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601058', 'tblTempUsageDetail_20' ) start [2025-03-03 20:58:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601058', 'tblTempUsageDetail_20' ) end [2025-03-03 20:58:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:58:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:58:22] Production.INFO: ==29151== Releasing lock... [2025-03-03 20:58:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:58:22] Production.INFO: 38.5 MB #Memory Used# [2025-03-03 20:59:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 17:59:06 [end_date_ymd] => 2025-03-03 20:59:06 [RateCDR] => 1 ) [2025-03-03 20: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-03 17:59:06' and `end` < '2025-03-03 20: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-03 20:59:18] Production.INFO: count ==1409 [2025-03-03 20:59:19] Production.ERROR: pbx CDR StartTime 2025-03-03 17:59:06 - End Time 2025-03-03 20:59:06 [2025-03-03 20:59:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 20:59:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601063', 'tblTempUsageDetail_20' ) start [2025-03-03 20:59:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601063', 'tblTempUsageDetail_20' ) end [2025-03-03 20:59:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601063', 'tblTempVendorCDR_20' ) start [2025-03-03 20:59:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601063', 'tblTempVendorCDR_20' ) end [2025-03-03 20:59:19] Production.INFO: ProcessCDR(1,14601063,1,1,2) [2025-03-03 20:59:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601063,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:59:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601063,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 20:59:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601063,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:59:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601063,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 20:59:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601063', 'tblTempUsageDetail_20' ) start [2025-03-03 20:59:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601063', 'tblTempUsageDetail_20' ) end [2025-03-03 20:59:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 20:59:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 20:59:22] Production.INFO: ==29224== Releasing lock... [2025-03-03 20:59:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 20:59:22] Production.INFO: 38.5 MB #Memory Used# [2025-03-03 21:00:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:00:07 [end_date_ymd] => 2025-03-03 21:00:07 [RateCDR] => 1 ) [2025-03-03 21: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-03 18:00:07' and `end` < '2025-03-03 21: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-03 21:00:19] Production.INFO: count ==1407 [2025-03-03 21:00:19] Production.ERROR: pbx CDR StartTime 2025-03-03 18:00:07 - End Time 2025-03-03 21:00:07 [2025-03-03 21:00:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:00:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601068', 'tblTempUsageDetail_20' ) start [2025-03-03 21:00:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601068', 'tblTempUsageDetail_20' ) end [2025-03-03 21:00:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601068', 'tblTempVendorCDR_20' ) start [2025-03-03 21:00:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601068', 'tblTempVendorCDR_20' ) end [2025-03-03 21:00:19] Production.INFO: ProcessCDR(1,14601068,1,1,2) [2025-03-03 21:00:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601068,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:00:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601068,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:00:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601068,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:00:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601068,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:00:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601068', 'tblTempUsageDetail_20' ) start [2025-03-03 21:00:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601068', 'tblTempUsageDetail_20' ) end [2025-03-03 21:00:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:00:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:00:23] Production.INFO: ==29303== Releasing lock... [2025-03-03 21:00:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:00:23] Production.INFO: 38.75 MB #Memory Used# [2025-03-03 21:01:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:01:05 [end_date_ymd] => 2025-03-03 21:01:05 [RateCDR] => 1 ) [2025-03-03 21:01:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 18:01:05' and `end` < '2025-03-03 21:01:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 21:01:18] Production.INFO: count ==1363 [2025-03-03 21:01:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:01:05 - End Time 2025-03-03 21:01:05 [2025-03-03 21:01:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601074', 'tblTempUsageDetail_20' ) start [2025-03-03 21:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601074', 'tblTempUsageDetail_20' ) end [2025-03-03 21:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601074', 'tblTempVendorCDR_20' ) start [2025-03-03 21:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601074', 'tblTempVendorCDR_20' ) end [2025-03-03 21:01:18] Production.INFO: ProcessCDR(1,14601074,1,1,2) [2025-03-03 21:01:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601074,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:01:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601074,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:01:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601074,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:01:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601074,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601074', 'tblTempUsageDetail_20' ) start [2025-03-03 21:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601074', 'tblTempUsageDetail_20' ) end [2025-03-03 21:01:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:01:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:01:21] Production.INFO: ==29390== Releasing lock... [2025-03-03 21:01:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:01:21] Production.INFO: 38.25 MB #Memory Used# [2025-03-03 21:02:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:02:06 [end_date_ymd] => 2025-03-03 21:02:06 [RateCDR] => 1 ) [2025-03-03 21: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-03 18:02:06' and `end` < '2025-03-03 21: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-03 21:02:18] Production.INFO: count ==1365 [2025-03-03 21:02:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:02:06 - End Time 2025-03-03 21:02:06 [2025-03-03 21:02:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601079', 'tblTempUsageDetail_20' ) start [2025-03-03 21:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601079', 'tblTempUsageDetail_20' ) end [2025-03-03 21:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601079', 'tblTempVendorCDR_20' ) start [2025-03-03 21:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601079', 'tblTempVendorCDR_20' ) end [2025-03-03 21:02:18] Production.INFO: ProcessCDR(1,14601079,1,1,2) [2025-03-03 21:02:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601079,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:02:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601079,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:02:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601079,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:02:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601079,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:02:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601079', 'tblTempUsageDetail_20' ) start [2025-03-03 21:02:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601079', 'tblTempUsageDetail_20' ) end [2025-03-03 21:02:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:02:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:02:21] Production.INFO: ==29463== Releasing lock... [2025-03-03 21:02:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:02:21] Production.INFO: 38 MB #Memory Used# [2025-03-03 21:03:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:03:05 [end_date_ymd] => 2025-03-03 21:03:05 [RateCDR] => 1 ) [2025-03-03 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-03 18:03:05' and `end` < '2025-03-03 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-03 21:03:18] Production.INFO: count ==1362 [2025-03-03 21:03:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:03:05 - End Time 2025-03-03 21:03:05 [2025-03-03 21:03:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601084', 'tblTempUsageDetail_20' ) start [2025-03-03 21:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601084', 'tblTempUsageDetail_20' ) end [2025-03-03 21:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601084', 'tblTempVendorCDR_20' ) start [2025-03-03 21:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601084', 'tblTempVendorCDR_20' ) end [2025-03-03 21:03:18] Production.INFO: ProcessCDR(1,14601084,1,1,2) [2025-03-03 21:03:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601084,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:03:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601084,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:03:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601084,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:03:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601084,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:03:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601084', 'tblTempUsageDetail_20' ) start [2025-03-03 21:03:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601084', 'tblTempUsageDetail_20' ) end [2025-03-03 21:03:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:03:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:03:21] Production.INFO: ==29543== Releasing lock... [2025-03-03 21:03:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:03:21] Production.INFO: 38.5 MB #Memory Used# [2025-03-03 21:04:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:04:06 [end_date_ymd] => 2025-03-03 21:04:06 [RateCDR] => 1 ) [2025-03-03 21: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-03 18:04:06' and `end` < '2025-03-03 21: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-03 21:04:18] Production.INFO: count ==1356 [2025-03-03 21:04:19] Production.ERROR: pbx CDR StartTime 2025-03-03 18:04:06 - End Time 2025-03-03 21:04:06 [2025-03-03 21:04:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:04:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601089', 'tblTempUsageDetail_20' ) start [2025-03-03 21:04:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601089', 'tblTempUsageDetail_20' ) end [2025-03-03 21:04:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601089', 'tblTempVendorCDR_20' ) start [2025-03-03 21:04:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601089', 'tblTempVendorCDR_20' ) end [2025-03-03 21:04:19] Production.INFO: ProcessCDR(1,14601089,1,1,2) [2025-03-03 21:04:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601089,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:04:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601089,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:04:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601089,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:04:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601089,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:04:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601089', 'tblTempUsageDetail_20' ) start [2025-03-03 21:04:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601089', 'tblTempUsageDetail_20' ) end [2025-03-03 21:04:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:04:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:04:22] Production.INFO: ==29616== Releasing lock... [2025-03-03 21:04:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:04:22] Production.INFO: 38.5 MB #Memory Used# [2025-03-03 21:05:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:05:05 [end_date_ymd] => 2025-03-03 21:05:05 [RateCDR] => 1 ) [2025-03-03 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-03 18:05:05' and `end` < '2025-03-03 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-03 21:05:17] Production.INFO: count ==1350 [2025-03-03 21:05:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:05:05 - End Time 2025-03-03 21:05:05 [2025-03-03 21:05:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601094', 'tblTempUsageDetail_20' ) start [2025-03-03 21:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601094', 'tblTempUsageDetail_20' ) end [2025-03-03 21:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601094', 'tblTempVendorCDR_20' ) start [2025-03-03 21:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601094', 'tblTempVendorCDR_20' ) end [2025-03-03 21:05:18] Production.INFO: ProcessCDR(1,14601094,1,1,2) [2025-03-03 21:05:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601094,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:05:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601094,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:05:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601094,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:05:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601094,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:05:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601094', 'tblTempUsageDetail_20' ) start [2025-03-03 21:05:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601094', 'tblTempUsageDetail_20' ) end [2025-03-03 21:05:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:05:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:05:21] Production.INFO: ==29689== Releasing lock... [2025-03-03 21:05:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:05:21] Production.INFO: 38.5 MB #Memory Used# [2025-03-03 21:06:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:06:06 [end_date_ymd] => 2025-03-03 21:06:06 [RateCDR] => 1 ) [2025-03-03 21: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-03 18:06:06' and `end` < '2025-03-03 21: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-03 21:06:18] Production.INFO: count ==1348 [2025-03-03 21:06:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:06:06 - End Time 2025-03-03 21:06:06 [2025-03-03 21:06:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:06:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601099', 'tblTempUsageDetail_20' ) start [2025-03-03 21:06:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601099', 'tblTempUsageDetail_20' ) end [2025-03-03 21:06:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601099', 'tblTempVendorCDR_20' ) start [2025-03-03 21:06:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601099', 'tblTempVendorCDR_20' ) end [2025-03-03 21:06:18] Production.INFO: ProcessCDR(1,14601099,1,1,2) [2025-03-03 21:06:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601099,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:06:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601099,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:06:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601099,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:06:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601099,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:06:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601099', 'tblTempUsageDetail_20' ) start [2025-03-03 21:06:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601099', 'tblTempUsageDetail_20' ) end [2025-03-03 21:06:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:06:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:06:21] Production.INFO: ==29763== Releasing lock... [2025-03-03 21:06:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:06:21] Production.INFO: 38 MB #Memory Used# [2025-03-03 21:07:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:07:05 [end_date_ymd] => 2025-03-03 21:07:05 [RateCDR] => 1 ) [2025-03-03 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-03 18:07:05' and `end` < '2025-03-03 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-03 21:07:17] Production.INFO: count ==1345 [2025-03-03 21:07:17] Production.ERROR: pbx CDR StartTime 2025-03-03 18:07:05 - End Time 2025-03-03 21:07:05 [2025-03-03 21:07:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601104', 'tblTempUsageDetail_20' ) start [2025-03-03 21:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601104', 'tblTempUsageDetail_20' ) end [2025-03-03 21:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601104', 'tblTempVendorCDR_20' ) start [2025-03-03 21:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601104', 'tblTempVendorCDR_20' ) end [2025-03-03 21:07:17] Production.INFO: ProcessCDR(1,14601104,1,1,2) [2025-03-03 21:07:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601104,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:07:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601104,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:07:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601104,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:07:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601104,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:07:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601104', 'tblTempUsageDetail_20' ) start [2025-03-03 21:07:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601104', 'tblTempUsageDetail_20' ) end [2025-03-03 21:07:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:07:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:07:21] Production.INFO: ==29835== Releasing lock... [2025-03-03 21:07:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:07:21] Production.INFO: 38.25 MB #Memory Used# [2025-03-03 21:08:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:08:05 [end_date_ymd] => 2025-03-03 21:08:05 [RateCDR] => 1 ) [2025-03-03 21: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-03 18:08:05' and `end` < '2025-03-03 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-03 21:08:18] Production.INFO: count ==1343 [2025-03-03 21:08:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:08:05 - End Time 2025-03-03 21:08:05 [2025-03-03 21:08:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601109', 'tblTempUsageDetail_20' ) start [2025-03-03 21:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601109', 'tblTempUsageDetail_20' ) end [2025-03-03 21:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601109', 'tblTempVendorCDR_20' ) start [2025-03-03 21:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601109', 'tblTempVendorCDR_20' ) end [2025-03-03 21:08:18] Production.INFO: ProcessCDR(1,14601109,1,1,2) [2025-03-03 21:08:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601109,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:08:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601109,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:08:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601109,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:08:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601109,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:08:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601109', 'tblTempUsageDetail_20' ) start [2025-03-03 21:08:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601109', 'tblTempUsageDetail_20' ) end [2025-03-03 21:08:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:08:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:08:21] Production.INFO: ==29909== Releasing lock... [2025-03-03 21:08:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:08:21] Production.INFO: 38.75 MB #Memory Used# [2025-03-03 21:09:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:09:05 [end_date_ymd] => 2025-03-03 21:09:05 [RateCDR] => 1 ) [2025-03-03 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-03 18:09:05' and `end` < '2025-03-03 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-03 21:09:17] Production.INFO: count ==1341 [2025-03-03 21:09:17] Production.ERROR: pbx CDR StartTime 2025-03-03 18:09:05 - End Time 2025-03-03 21:09:05 [2025-03-03 21:09:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601114', 'tblTempUsageDetail_20' ) start [2025-03-03 21:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601114', 'tblTempUsageDetail_20' ) end [2025-03-03 21:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601114', 'tblTempVendorCDR_20' ) start [2025-03-03 21:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601114', 'tblTempVendorCDR_20' ) end [2025-03-03 21:09:17] Production.INFO: ProcessCDR(1,14601114,1,1,2) [2025-03-03 21:09:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601114,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:09:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601114,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:09:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601114,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:09:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601114,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:09:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601114', 'tblTempUsageDetail_20' ) start [2025-03-03 21:09:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601114', 'tblTempUsageDetail_20' ) end [2025-03-03 21:09:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:09:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:09:21] Production.INFO: ==29982== Releasing lock... [2025-03-03 21:09:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:09:21] Production.INFO: 38.25 MB #Memory Used# [2025-03-03 21:10:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:10:06 [end_date_ymd] => 2025-03-03 21:10:06 [RateCDR] => 1 ) [2025-03-03 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-03 18:10:06' and `end` < '2025-03-03 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-03 21:10:18] Production.INFO: count ==1343 [2025-03-03 21:10:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:10:06 - End Time 2025-03-03 21:10:06 [2025-03-03 21:10:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601119', 'tblTempUsageDetail_20' ) start [2025-03-03 21:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601119', 'tblTempUsageDetail_20' ) end [2025-03-03 21:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601119', 'tblTempVendorCDR_20' ) start [2025-03-03 21:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601119', 'tblTempVendorCDR_20' ) end [2025-03-03 21:10:18] Production.INFO: ProcessCDR(1,14601119,1,1,2) [2025-03-03 21:10:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601119,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:10:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601119,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:10:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601119,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:10:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601119,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:10:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601119', 'tblTempUsageDetail_20' ) start [2025-03-03 21:10:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601119', 'tblTempUsageDetail_20' ) end [2025-03-03 21:10:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:10:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:10:23] Production.INFO: ==30053== Releasing lock... [2025-03-03 21:10:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:10:23] Production.INFO: 38.25 MB #Memory Used# [2025-03-03 21:11:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:11:04 [end_date_ymd] => 2025-03-03 21:11:04 [RateCDR] => 1 ) [2025-03-03 21:11:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 18:11:04' and `end` < '2025-03-03 21: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-03 21:11:17] Production.INFO: count ==1304 [2025-03-03 21:11:17] Production.ERROR: pbx CDR StartTime 2025-03-03 18:11:04 - End Time 2025-03-03 21:11:04 [2025-03-03 21:11:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601125', 'tblTempUsageDetail_20' ) start [2025-03-03 21:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601125', 'tblTempUsageDetail_20' ) end [2025-03-03 21:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601125', 'tblTempVendorCDR_20' ) start [2025-03-03 21:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601125', 'tblTempVendorCDR_20' ) end [2025-03-03 21:11:17] Production.INFO: ProcessCDR(1,14601125,1,1,2) [2025-03-03 21:11:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601125,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:11:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601125,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:11:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601125,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:11:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601125,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:11:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601125', 'tblTempUsageDetail_20' ) start [2025-03-03 21:11:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601125', 'tblTempUsageDetail_20' ) end [2025-03-03 21:11:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:11:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:11:21] Production.INFO: ==30130== Releasing lock... [2025-03-03 21:11:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:11:21] Production.INFO: 38.25 MB #Memory Used# [2025-03-03 21:12:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:12:05 [end_date_ymd] => 2025-03-03 21:12:05 [RateCDR] => 1 ) [2025-03-03 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-03 18:12:05' and `end` < '2025-03-03 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-03 21:12:17] Production.INFO: count ==1303 [2025-03-03 21:12:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:12:05 - End Time 2025-03-03 21:12:05 [2025-03-03 21:12:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601130', 'tblTempUsageDetail_20' ) start [2025-03-03 21:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601130', 'tblTempUsageDetail_20' ) end [2025-03-03 21:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601130', 'tblTempVendorCDR_20' ) start [2025-03-03 21:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601130', 'tblTempVendorCDR_20' ) end [2025-03-03 21:12:18] Production.INFO: ProcessCDR(1,14601130,1,1,2) [2025-03-03 21:12:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601130,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:12:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601130,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:12:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601130,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:12:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601130,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:12:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601130', 'tblTempUsageDetail_20' ) start [2025-03-03 21:12:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601130', 'tblTempUsageDetail_20' ) end [2025-03-03 21:12:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:12:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:12:23] Production.INFO: ==30204== Releasing lock... [2025-03-03 21:12:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:12:23] Production.INFO: 37.75 MB #Memory Used# [2025-03-03 21:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:13:05 [end_date_ymd] => 2025-03-03 21:13:05 [RateCDR] => 1 ) [2025-03-03 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-03 18:13:05' and `end` < '2025-03-03 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-03 21:13:17] Production.INFO: count ==1300 [2025-03-03 21:13:17] Production.ERROR: pbx CDR StartTime 2025-03-03 18:13:05 - End Time 2025-03-03 21:13:05 [2025-03-03 21:13:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601135', 'tblTempUsageDetail_20' ) start [2025-03-03 21:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601135', 'tblTempUsageDetail_20' ) end [2025-03-03 21:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601135', 'tblTempVendorCDR_20' ) start [2025-03-03 21:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601135', 'tblTempVendorCDR_20' ) end [2025-03-03 21:13:17] Production.INFO: ProcessCDR(1,14601135,1,1,2) [2025-03-03 21:13:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601135,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:13:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601135,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:13:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601135,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:13:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601135,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:13:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601135', 'tblTempUsageDetail_20' ) start [2025-03-03 21:13:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601135', 'tblTempUsageDetail_20' ) end [2025-03-03 21:13:20] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:13:20] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:13:20] Production.INFO: ==30321== Releasing lock... [2025-03-03 21:13:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:13:20] Production.INFO: 37.75 MB #Memory Used# [2025-03-03 21:14:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:14:05 [end_date_ymd] => 2025-03-03 21:14:05 [RateCDR] => 1 ) [2025-03-03 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-03 18:14:05' and `end` < '2025-03-03 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-03 21:14:17] Production.INFO: count ==1294 [2025-03-03 21:14:17] Production.ERROR: pbx CDR StartTime 2025-03-03 18:14:05 - End Time 2025-03-03 21:14:05 [2025-03-03 21:14:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601140', 'tblTempUsageDetail_20' ) start [2025-03-03 21:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601140', 'tblTempUsageDetail_20' ) end [2025-03-03 21:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601140', 'tblTempVendorCDR_20' ) start [2025-03-03 21:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601140', 'tblTempVendorCDR_20' ) end [2025-03-03 21:14:17] Production.INFO: ProcessCDR(1,14601140,1,1,2) [2025-03-03 21:14:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601140,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:14:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601140,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:14:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601140,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:14:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601140,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:14:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601140', 'tblTempUsageDetail_20' ) start [2025-03-03 21:14:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601140', 'tblTempUsageDetail_20' ) end [2025-03-03 21:14:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:14:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:14:21] Production.INFO: ==30392== Releasing lock... [2025-03-03 21:14:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:14:21] Production.INFO: 37.75 MB #Memory Used# [2025-03-03 21:15:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:15:05 [end_date_ymd] => 2025-03-03 21:15:05 [RateCDR] => 1 ) [2025-03-03 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-03 18:15:05' and `end` < '2025-03-03 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-03 21:15:17] Production.INFO: count ==1280 [2025-03-03 21:15:17] Production.ERROR: pbx CDR StartTime 2025-03-03 18:15:05 - End Time 2025-03-03 21:15:05 [2025-03-03 21:15:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601145', 'tblTempUsageDetail_20' ) start [2025-03-03 21:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601145', 'tblTempUsageDetail_20' ) end [2025-03-03 21:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601145', 'tblTempVendorCDR_20' ) start [2025-03-03 21:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601145', 'tblTempVendorCDR_20' ) end [2025-03-03 21:15:17] Production.INFO: ProcessCDR(1,14601145,1,1,2) [2025-03-03 21:15:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601145,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:15:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601145,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:15:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601145,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:15:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601145,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:15:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601145', 'tblTempUsageDetail_20' ) start [2025-03-03 21:15:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601145', 'tblTempUsageDetail_20' ) end [2025-03-03 21:15:20] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:15:20] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:15:20] Production.INFO: ==30464== Releasing lock... [2025-03-03 21:15:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:15:20] Production.INFO: 37.5 MB #Memory Used# [2025-03-03 21:16:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:16:05 [end_date_ymd] => 2025-03-03 21:16:05 [RateCDR] => 1 ) [2025-03-03 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-03 18:16:05' and `end` < '2025-03-03 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-03 21:16:17] Production.INFO: count ==1279 [2025-03-03 21:16:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:16:05 - End Time 2025-03-03 21:16:05 [2025-03-03 21:16:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601150', 'tblTempUsageDetail_20' ) start [2025-03-03 21:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601150', 'tblTempUsageDetail_20' ) end [2025-03-03 21:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601150', 'tblTempVendorCDR_20' ) start [2025-03-03 21:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601150', 'tblTempVendorCDR_20' ) end [2025-03-03 21:16:18] Production.INFO: ProcessCDR(1,14601150,1,1,2) [2025-03-03 21:16:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601150,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:16:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601150,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:16:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601150,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:16:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601150,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601150', 'tblTempUsageDetail_20' ) start [2025-03-03 21:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601150', 'tblTempUsageDetail_20' ) end [2025-03-03 21:16:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:16:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:16:21] Production.INFO: ==30535== Releasing lock... [2025-03-03 21:16:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:16:21] Production.INFO: 37.5 MB #Memory Used# [2025-03-03 21:17:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:17:05 [end_date_ymd] => 2025-03-03 21:17:05 [RateCDR] => 1 ) [2025-03-03 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-03 18:17:05' and `end` < '2025-03-03 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-03 21:17:18] Production.INFO: count ==1276 [2025-03-03 21:17:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:17:05 - End Time 2025-03-03 21:17:05 [2025-03-03 21:17:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601155', 'tblTempUsageDetail_20' ) start [2025-03-03 21:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601155', 'tblTempUsageDetail_20' ) end [2025-03-03 21:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601155', 'tblTempVendorCDR_20' ) start [2025-03-03 21:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601155', 'tblTempVendorCDR_20' ) end [2025-03-03 21:17:18] Production.INFO: ProcessCDR(1,14601155,1,1,2) [2025-03-03 21:17:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601155,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:17:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601155,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:17:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601155,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:17:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601155,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601155', 'tblTempUsageDetail_20' ) start [2025-03-03 21:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601155', 'tblTempUsageDetail_20' ) end [2025-03-03 21:17:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:17:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:17:21] Production.INFO: ==30606== Releasing lock... [2025-03-03 21:17:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:17:21] Production.INFO: 37.25 MB #Memory Used# [2025-03-03 21:18:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:18:06 [end_date_ymd] => 2025-03-03 21:18:06 [RateCDR] => 1 ) [2025-03-03 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-03 18:18:06' and `end` < '2025-03-03 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-03 21:18:18] Production.INFO: count ==1276 [2025-03-03 21:18:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:18:06 - End Time 2025-03-03 21:18:06 [2025-03-03 21:18:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601160', 'tblTempUsageDetail_20' ) start [2025-03-03 21:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601160', 'tblTempUsageDetail_20' ) end [2025-03-03 21:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601160', 'tblTempVendorCDR_20' ) start [2025-03-03 21:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601160', 'tblTempVendorCDR_20' ) end [2025-03-03 21:18:18] Production.INFO: ProcessCDR(1,14601160,1,1,2) [2025-03-03 21:18:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601160,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:18:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601160,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:18:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601160,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:18:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601160,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601160', 'tblTempUsageDetail_20' ) start [2025-03-03 21:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601160', 'tblTempUsageDetail_20' ) end [2025-03-03 21:18:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:18:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:18:21] Production.INFO: ==30681== Releasing lock... [2025-03-03 21:18:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:18:21] Production.INFO: 37.25 MB #Memory Used# [2025-03-03 21:19:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:19:05 [end_date_ymd] => 2025-03-03 21:19:05 [RateCDR] => 1 ) [2025-03-03 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-03 18:19:05' and `end` < '2025-03-03 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-03 21:19:17] Production.INFO: count ==1269 [2025-03-03 21:19:17] Production.ERROR: pbx CDR StartTime 2025-03-03 18:19:05 - End Time 2025-03-03 21:19:05 [2025-03-03 21:19:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601165', 'tblTempUsageDetail_20' ) start [2025-03-03 21:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601165', 'tblTempUsageDetail_20' ) end [2025-03-03 21:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601165', 'tblTempVendorCDR_20' ) start [2025-03-03 21:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601165', 'tblTempVendorCDR_20' ) end [2025-03-03 21:19:17] Production.INFO: ProcessCDR(1,14601165,1,1,2) [2025-03-03 21:19:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601165,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:19:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601165,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:19:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601165,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:19:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601165,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:19:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601165', 'tblTempUsageDetail_20' ) start [2025-03-03 21:19:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601165', 'tblTempUsageDetail_20' ) end [2025-03-03 21:19:20] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:19:20] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:19:20] Production.INFO: ==30754== Releasing lock... [2025-03-03 21:19:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:19:20] Production.INFO: 37.5 MB #Memory Used# [2025-03-03 21:20:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:20:06 [end_date_ymd] => 2025-03-03 21:20:06 [RateCDR] => 1 ) [2025-03-03 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-03 18:20:06' and `end` < '2025-03-03 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-03 21:20:18] Production.INFO: count ==1268 [2025-03-03 21:20:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:20:06 - End Time 2025-03-03 21:20:06 [2025-03-03 21:20:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601171', 'tblTempUsageDetail_20' ) start [2025-03-03 21:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601171', 'tblTempUsageDetail_20' ) end [2025-03-03 21:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601171', 'tblTempVendorCDR_20' ) start [2025-03-03 21:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601171', 'tblTempVendorCDR_20' ) end [2025-03-03 21:20:18] Production.INFO: ProcessCDR(1,14601171,1,1,2) [2025-03-03 21:20:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601171,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:20:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601171,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:20:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601171,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:20:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601171,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:20:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601171', 'tblTempUsageDetail_20' ) start [2025-03-03 21:20:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601171', 'tblTempUsageDetail_20' ) end [2025-03-03 21:20:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:20:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:20:21] Production.INFO: ==30828== Releasing lock... [2025-03-03 21:20:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:20:21] Production.INFO: 37.5 MB #Memory Used# [2025-03-03 21:21:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:21:04 [end_date_ymd] => 2025-03-03 21:21:04 [RateCDR] => 1 ) [2025-03-03 21:21:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 18:21:04' and `end` < '2025-03-03 21:21:04' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 21:21:17] Production.INFO: count ==1211 [2025-03-03 21:21:17] Production.ERROR: pbx CDR StartTime 2025-03-03 18:21:04 - End Time 2025-03-03 21:21:04 [2025-03-03 21:21:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601176', 'tblTempUsageDetail_20' ) start [2025-03-03 21:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601176', 'tblTempUsageDetail_20' ) end [2025-03-03 21:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601176', 'tblTempVendorCDR_20' ) start [2025-03-03 21:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601176', 'tblTempVendorCDR_20' ) end [2025-03-03 21:21:17] Production.INFO: ProcessCDR(1,14601176,1,1,2) [2025-03-03 21:21:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601176,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:21:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601176,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:21:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601176,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:21:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601176,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:21:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601176', 'tblTempUsageDetail_20' ) start [2025-03-03 21:21:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601176', 'tblTempUsageDetail_20' ) end [2025-03-03 21:21:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:21:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:21:22] Production.INFO: ==30901== Releasing lock... [2025-03-03 21:21:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:21:22] Production.INFO: 37.5 MB #Memory Used# [2025-03-03 21:22:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:22:06 [end_date_ymd] => 2025-03-03 21:22:06 [RateCDR] => 1 ) [2025-03-03 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-03 18:22:06' and `end` < '2025-03-03 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-03 21:22:18] Production.INFO: count ==1214 [2025-03-03 21:22:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:22:06 - End Time 2025-03-03 21:22:06 [2025-03-03 21:22:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601181', 'tblTempUsageDetail_20' ) start [2025-03-03 21:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601181', 'tblTempUsageDetail_20' ) end [2025-03-03 21:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601181', 'tblTempVendorCDR_20' ) start [2025-03-03 21:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601181', 'tblTempVendorCDR_20' ) end [2025-03-03 21:22:18] Production.INFO: ProcessCDR(1,14601181,1,1,2) [2025-03-03 21:22:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601181,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:22:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601181,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:22:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601181,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:22:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601181,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:22:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601181', 'tblTempUsageDetail_20' ) start [2025-03-03 21:22:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601181', 'tblTempUsageDetail_20' ) end [2025-03-03 21:22:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:22:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:22:23] Production.INFO: ==30973== Releasing lock... [2025-03-03 21:22:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:22:23] Production.INFO: 37.25 MB #Memory Used# [2025-03-03 21:23:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:23:05 [end_date_ymd] => 2025-03-03 21:23:05 [RateCDR] => 1 ) [2025-03-03 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-03 18:23:05' and `end` < '2025-03-03 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-03 21:23:17] Production.INFO: count ==1207 [2025-03-03 21:23:17] Production.ERROR: pbx CDR StartTime 2025-03-03 18:23:05 - End Time 2025-03-03 21:23:05 [2025-03-03 21:23:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601186', 'tblTempUsageDetail_20' ) start [2025-03-03 21:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601186', 'tblTempUsageDetail_20' ) end [2025-03-03 21:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601186', 'tblTempVendorCDR_20' ) start [2025-03-03 21:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601186', 'tblTempVendorCDR_20' ) end [2025-03-03 21:23:17] Production.INFO: ProcessCDR(1,14601186,1,1,2) [2025-03-03 21:23:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601186,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:23:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601186,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:23:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601186,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:23:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601186,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:23:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601186', 'tblTempUsageDetail_20' ) start [2025-03-03 21:23:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601186', 'tblTempUsageDetail_20' ) end [2025-03-03 21:23:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:23:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:23:21] Production.INFO: ==31049== Releasing lock... [2025-03-03 21:23:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:23:21] Production.INFO: 37 MB #Memory Used# [2025-03-03 21:24:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:24:06 [end_date_ymd] => 2025-03-03 21:24:06 [RateCDR] => 1 ) [2025-03-03 21: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-03 18:24:06' and `end` < '2025-03-03 21: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-03 21:24:18] Production.INFO: count ==1203 [2025-03-03 21:24:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:24:06 - End Time 2025-03-03 21:24:06 [2025-03-03 21:24:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601191', 'tblTempUsageDetail_20' ) start [2025-03-03 21:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601191', 'tblTempUsageDetail_20' ) end [2025-03-03 21:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601191', 'tblTempVendorCDR_20' ) start [2025-03-03 21:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601191', 'tblTempVendorCDR_20' ) end [2025-03-03 21:24:18] Production.INFO: ProcessCDR(1,14601191,1,1,2) [2025-03-03 21:24:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601191,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:24:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601191,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:24:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601191,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:24:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601191,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601191', 'tblTempUsageDetail_20' ) start [2025-03-03 21:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601191', 'tblTempUsageDetail_20' ) end [2025-03-03 21:24:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:24:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:24:21] Production.INFO: ==31123== Releasing lock... [2025-03-03 21:24:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:24:21] Production.INFO: 36.75 MB #Memory Used# [2025-03-03 21:25:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:25:05 [end_date_ymd] => 2025-03-03 21:25:05 [RateCDR] => 1 ) [2025-03-03 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-03 18:25:05' and `end` < '2025-03-03 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-03 21:25:17] Production.INFO: count ==1200 [2025-03-03 21:25:17] Production.ERROR: pbx CDR StartTime 2025-03-03 18:25:05 - End Time 2025-03-03 21:25:05 [2025-03-03 21:25:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601196', 'tblTempUsageDetail_20' ) start [2025-03-03 21:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601196', 'tblTempUsageDetail_20' ) end [2025-03-03 21:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601196', 'tblTempVendorCDR_20' ) start [2025-03-03 21:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601196', 'tblTempVendorCDR_20' ) end [2025-03-03 21:25:17] Production.INFO: ProcessCDR(1,14601196,1,1,2) [2025-03-03 21:25:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601196,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:25:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601196,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:25:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601196,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:25:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601196,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601196', 'tblTempUsageDetail_20' ) start [2025-03-03 21:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601196', 'tblTempUsageDetail_20' ) end [2025-03-03 21:25:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:25:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:25:21] Production.INFO: ==31194== Releasing lock... [2025-03-03 21:25:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:25:21] Production.INFO: 37 MB #Memory Used# [2025-03-03 21:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:26:05 [end_date_ymd] => 2025-03-03 21:26:05 [RateCDR] => 1 ) [2025-03-03 21:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 18:26:05' and `end` < '2025-03-03 21:26:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 21:26:18] Production.INFO: count ==1197 [2025-03-03 21:26:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:26:05 - End Time 2025-03-03 21:26:05 [2025-03-03 21:26:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601201', 'tblTempUsageDetail_20' ) start [2025-03-03 21:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601201', 'tblTempUsageDetail_20' ) end [2025-03-03 21:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601201', 'tblTempVendorCDR_20' ) start [2025-03-03 21:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601201', 'tblTempVendorCDR_20' ) end [2025-03-03 21:26:18] Production.INFO: ProcessCDR(1,14601201,1,1,2) [2025-03-03 21:26:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601201,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:26:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601201,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:26:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601201,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:26:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601201,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:26:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601201', 'tblTempUsageDetail_20' ) start [2025-03-03 21:26:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601201', 'tblTempUsageDetail_20' ) end [2025-03-03 21:26:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:26:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:26:22] Production.INFO: ==31267== Releasing lock... [2025-03-03 21:26:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:26:22] Production.INFO: 37 MB #Memory Used# [2025-03-03 21:27:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:27:04 [end_date_ymd] => 2025-03-03 21:27:04 [RateCDR] => 1 ) [2025-03-03 21:27:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 18:27:04' and `end` < '2025-03-03 21: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-03 21:27:16] Production.INFO: count ==1193 [2025-03-03 21:27:16] Production.ERROR: pbx CDR StartTime 2025-03-03 18:27:04 - End Time 2025-03-03 21:27:04 [2025-03-03 21:27:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601206', 'tblTempUsageDetail_20' ) start [2025-03-03 21:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601206', 'tblTempUsageDetail_20' ) end [2025-03-03 21:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601206', 'tblTempVendorCDR_20' ) start [2025-03-03 21:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601206', 'tblTempVendorCDR_20' ) end [2025-03-03 21:27:17] Production.INFO: ProcessCDR(1,14601206,1,1,2) [2025-03-03 21:27:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601206,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:27:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601206,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:27:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601206,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:27:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601206,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:27:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601206', 'tblTempUsageDetail_20' ) start [2025-03-03 21:27:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601206', 'tblTempUsageDetail_20' ) end [2025-03-03 21:27:20] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:27:20] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:27:20] Production.INFO: ==31343== Releasing lock... [2025-03-03 21:27:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:27:20] Production.INFO: 37 MB #Memory Used# [2025-03-03 21:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:28:05 [end_date_ymd] => 2025-03-03 21:28:05 [RateCDR] => 1 ) [2025-03-03 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-03 18:28:05' and `end` < '2025-03-03 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-03 21:28:18] Production.INFO: count ==1195 [2025-03-03 21:28:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:28:05 - End Time 2025-03-03 21:28:05 [2025-03-03 21:28:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601211', 'tblTempUsageDetail_20' ) start [2025-03-03 21:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601211', 'tblTempUsageDetail_20' ) end [2025-03-03 21:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601211', 'tblTempVendorCDR_20' ) start [2025-03-03 21:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601211', 'tblTempVendorCDR_20' ) end [2025-03-03 21:28:18] Production.INFO: ProcessCDR(1,14601211,1,1,2) [2025-03-03 21:28:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601211,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:28:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601211,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:28:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601211,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:28:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601211,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:28:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601211', 'tblTempUsageDetail_20' ) start [2025-03-03 21:28:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601211', 'tblTempUsageDetail_20' ) end [2025-03-03 21:28:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:28:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:28:21] Production.INFO: ==31454== Releasing lock... [2025-03-03 21:28:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:28:21] Production.INFO: 37 MB #Memory Used# [2025-03-03 21:29:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:29:04 [end_date_ymd] => 2025-03-03 21:29:04 [RateCDR] => 1 ) [2025-03-03 21: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-03 18:29:04' and `end` < '2025-03-03 21: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-03 21:29:16] Production.INFO: count ==1199 [2025-03-03 21:29:17] Production.ERROR: pbx CDR StartTime 2025-03-03 18:29:04 - End Time 2025-03-03 21:29:04 [2025-03-03 21:29:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601216', 'tblTempUsageDetail_20' ) start [2025-03-03 21:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601216', 'tblTempUsageDetail_20' ) end [2025-03-03 21:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601216', 'tblTempVendorCDR_20' ) start [2025-03-03 21:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601216', 'tblTempVendorCDR_20' ) end [2025-03-03 21:29:17] Production.INFO: ProcessCDR(1,14601216,1,1,2) [2025-03-03 21:29:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601216,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:29:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601216,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:29:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601216,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:29:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601216,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:29:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601216', 'tblTempUsageDetail_20' ) start [2025-03-03 21:29:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601216', 'tblTempUsageDetail_20' ) end [2025-03-03 21:29:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:29:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:29:21] Production.INFO: ==31523== Releasing lock... [2025-03-03 21:29:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:29:21] Production.INFO: 37 MB #Memory Used# [2025-03-03 21:30:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:30:06 [end_date_ymd] => 2025-03-03 21:30:06 [RateCDR] => 1 ) [2025-03-03 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-03 18:30:06' and `end` < '2025-03-03 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-03 21:30:18] Production.INFO: count ==1199 [2025-03-03 21:30:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:30:06 - End Time 2025-03-03 21:30:06 [2025-03-03 21:30:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601222', 'tblTempUsageDetail_20' ) start [2025-03-03 21:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601222', 'tblTempUsageDetail_20' ) end [2025-03-03 21:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601222', 'tblTempVendorCDR_20' ) start [2025-03-03 21:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601222', 'tblTempVendorCDR_20' ) end [2025-03-03 21:30:18] Production.INFO: ProcessCDR(1,14601222,1,1,2) [2025-03-03 21:30:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601222,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:30:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601222,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:30:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601222,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:30:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601222,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:30:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601222', 'tblTempUsageDetail_20' ) start [2025-03-03 21:30:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601222', 'tblTempUsageDetail_20' ) end [2025-03-03 21:30:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:30:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:30:21] Production.INFO: ==31597== Releasing lock... [2025-03-03 21:30:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:30:21] Production.INFO: 37 MB #Memory Used# [2025-03-03 21:31:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:31:05 [end_date_ymd] => 2025-03-03 21:31:05 [RateCDR] => 1 ) [2025-03-03 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-03 18:31:05' and `end` < '2025-03-03 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-03 21:31:17] Production.INFO: count ==1168 [2025-03-03 21:31:17] Production.ERROR: pbx CDR StartTime 2025-03-03 18:31:05 - End Time 2025-03-03 21:31:05 [2025-03-03 21:31:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601227', 'tblTempUsageDetail_20' ) start [2025-03-03 21:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601227', 'tblTempUsageDetail_20' ) end [2025-03-03 21:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601227', 'tblTempVendorCDR_20' ) start [2025-03-03 21:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601227', 'tblTempVendorCDR_20' ) end [2025-03-03 21:31:17] Production.INFO: ProcessCDR(1,14601227,1,1,2) [2025-03-03 21:31:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601227,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:31:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601227,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:31:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601227,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:31:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601227,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:31:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601227', 'tblTempUsageDetail_20' ) start [2025-03-03 21:31:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601227', 'tblTempUsageDetail_20' ) end [2025-03-03 21:31:20] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:31:20] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:31:20] Production.INFO: ==31671== Releasing lock... [2025-03-03 21:31:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:31:20] Production.INFO: 36.5 MB #Memory Used# [2025-03-03 21:32:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:32:05 [end_date_ymd] => 2025-03-03 21:32:05 [RateCDR] => 1 ) [2025-03-03 21:32:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 18:32:05' and `end` < '2025-03-03 21:32:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 21:32:17] Production.INFO: count ==1170 [2025-03-03 21:32:17] Production.ERROR: pbx CDR StartTime 2025-03-03 18:32:05 - End Time 2025-03-03 21:32:05 [2025-03-03 21:32:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601232', 'tblTempUsageDetail_20' ) start [2025-03-03 21:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601232', 'tblTempUsageDetail_20' ) end [2025-03-03 21:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601232', 'tblTempVendorCDR_20' ) start [2025-03-03 21:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601232', 'tblTempVendorCDR_20' ) end [2025-03-03 21:32:17] Production.INFO: ProcessCDR(1,14601232,1,1,2) [2025-03-03 21:32:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601232,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:32:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601232,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:32:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601232,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:32:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601232,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:32:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601232', 'tblTempUsageDetail_20' ) start [2025-03-03 21:32:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601232', 'tblTempUsageDetail_20' ) end [2025-03-03 21:32:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:32:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:32:22] Production.INFO: ==31744== Releasing lock... [2025-03-03 21:32:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:32:22] Production.INFO: 36.75 MB #Memory Used# [2025-03-03 21:33:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:33:05 [end_date_ymd] => 2025-03-03 21:33:05 [RateCDR] => 1 ) [2025-03-03 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-03 18:33:05' and `end` < '2025-03-03 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-03 21:33:17] Production.INFO: count ==1169 [2025-03-03 21:33:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:33:05 - End Time 2025-03-03 21:33:05 [2025-03-03 21:33:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601237', 'tblTempUsageDetail_20' ) start [2025-03-03 21:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601237', 'tblTempUsageDetail_20' ) end [2025-03-03 21:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601237', 'tblTempVendorCDR_20' ) start [2025-03-03 21:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601237', 'tblTempVendorCDR_20' ) end [2025-03-03 21:33:18] Production.INFO: ProcessCDR(1,14601237,1,1,2) [2025-03-03 21:33:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601237,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:33:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601237,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:33:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601237,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:33:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601237,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:33:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601237', 'tblTempUsageDetail_20' ) start [2025-03-03 21:33:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601237', 'tblTempUsageDetail_20' ) end [2025-03-03 21:33:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:33:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:33:22] Production.INFO: ==31814== Releasing lock... [2025-03-03 21:33:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:33:22] Production.INFO: 36.5 MB #Memory Used# [2025-03-03 21:34:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:34:05 [end_date_ymd] => 2025-03-03 21:34:05 [RateCDR] => 1 ) [2025-03-03 21: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-03 18:34:05' and `end` < '2025-03-03 21: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-03 21:34:17] Production.INFO: count ==1166 [2025-03-03 21:34:17] Production.ERROR: pbx CDR StartTime 2025-03-03 18:34:05 - End Time 2025-03-03 21:34:05 [2025-03-03 21:34:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601242', 'tblTempUsageDetail_20' ) start [2025-03-03 21:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601242', 'tblTempUsageDetail_20' ) end [2025-03-03 21:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601242', 'tblTempVendorCDR_20' ) start [2025-03-03 21:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601242', 'tblTempVendorCDR_20' ) end [2025-03-03 21:34:17] Production.INFO: ProcessCDR(1,14601242,1,1,2) [2025-03-03 21:34:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601242,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:34:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601242,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:34:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601242,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:34:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601242,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:34:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601242', 'tblTempUsageDetail_20' ) start [2025-03-03 21:34:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601242', 'tblTempUsageDetail_20' ) end [2025-03-03 21:34:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:34:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:34:22] Production.INFO: ==31886== Releasing lock... [2025-03-03 21:34:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:34:22] Production.INFO: 36.5 MB #Memory Used# [2025-03-03 21:35:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:35:05 [end_date_ymd] => 2025-03-03 21:35:05 [RateCDR] => 1 ) [2025-03-03 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-03 18:35:05' and `end` < '2025-03-03 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-03 21:35:17] Production.INFO: count ==1163 [2025-03-03 21:35:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:35:05 - End Time 2025-03-03 21:35:05 [2025-03-03 21:35:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601247', 'tblTempUsageDetail_20' ) start [2025-03-03 21:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601247', 'tblTempUsageDetail_20' ) end [2025-03-03 21:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601247', 'tblTempVendorCDR_20' ) start [2025-03-03 21:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601247', 'tblTempVendorCDR_20' ) end [2025-03-03 21:35:18] Production.INFO: ProcessCDR(1,14601247,1,1,2) [2025-03-03 21:35:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601247,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:35:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601247,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:35:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601247,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:35:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601247,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:35:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601247', 'tblTempUsageDetail_20' ) start [2025-03-03 21:35:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601247', 'tblTempUsageDetail_20' ) end [2025-03-03 21:35:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:35:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:35:22] Production.INFO: ==31956== Releasing lock... [2025-03-03 21:35:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:35:22] Production.INFO: 36.75 MB #Memory Used# [2025-03-03 21:36:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:36:05 [end_date_ymd] => 2025-03-03 21:36:05 [RateCDR] => 1 ) [2025-03-03 21: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-03 18:36:05' and `end` < '2025-03-03 21: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-03 21:36:17] Production.INFO: count ==1142 [2025-03-03 21:36:17] Production.ERROR: pbx CDR StartTime 2025-03-03 18:36:05 - End Time 2025-03-03 21:36:05 [2025-03-03 21:36:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601252', 'tblTempUsageDetail_20' ) start [2025-03-03 21:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601252', 'tblTempUsageDetail_20' ) end [2025-03-03 21:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601252', 'tblTempVendorCDR_20' ) start [2025-03-03 21:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601252', 'tblTempVendorCDR_20' ) end [2025-03-03 21:36:17] Production.INFO: ProcessCDR(1,14601252,1,1,2) [2025-03-03 21:36:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601252,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:36:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601252,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:36:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601252,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:36:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601252,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:36:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601252', 'tblTempUsageDetail_20' ) start [2025-03-03 21:36:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601252', 'tblTempUsageDetail_20' ) end [2025-03-03 21:36:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:36:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:36:21] Production.INFO: ==32029== Releasing lock... [2025-03-03 21:36:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:36:21] Production.INFO: 36.75 MB #Memory Used# [2025-03-03 21:37:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:37:05 [end_date_ymd] => 2025-03-03 21:37:05 [RateCDR] => 1 ) [2025-03-03 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-03 18:37:05' and `end` < '2025-03-03 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-03 21:37:17] Production.INFO: count ==1135 [2025-03-03 21:37:17] Production.ERROR: pbx CDR StartTime 2025-03-03 18:37:05 - End Time 2025-03-03 21:37:05 [2025-03-03 21:37:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601257', 'tblTempUsageDetail_20' ) start [2025-03-03 21:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601257', 'tblTempUsageDetail_20' ) end [2025-03-03 21:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601257', 'tblTempVendorCDR_20' ) start [2025-03-03 21:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601257', 'tblTempVendorCDR_20' ) end [2025-03-03 21:37:18] Production.INFO: ProcessCDR(1,14601257,1,1,2) [2025-03-03 21:37:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601257,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:37:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601257,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:37:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601257,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:37:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601257,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:37:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601257', 'tblTempUsageDetail_20' ) start [2025-03-03 21:37:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601257', 'tblTempUsageDetail_20' ) end [2025-03-03 21:37:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:37:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:37:22] Production.INFO: ==32102== Releasing lock... [2025-03-03 21:37:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:37:22] Production.INFO: 36.25 MB #Memory Used# [2025-03-03 21:38:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:38:05 [end_date_ymd] => 2025-03-03 21:38:05 [RateCDR] => 1 ) [2025-03-03 21: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-03 18:38:05' and `end` < '2025-03-03 21: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-03 21:38:18] Production.INFO: count ==1132 [2025-03-03 21:38:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:38:05 - End Time 2025-03-03 21:38:05 [2025-03-03 21:38:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601262', 'tblTempUsageDetail_20' ) start [2025-03-03 21:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601262', 'tblTempUsageDetail_20' ) end [2025-03-03 21:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601262', 'tblTempVendorCDR_20' ) start [2025-03-03 21:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601262', 'tblTempVendorCDR_20' ) end [2025-03-03 21:38:18] Production.INFO: ProcessCDR(1,14601262,1,1,2) [2025-03-03 21:38:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601262,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:38:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601262,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:38:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601262,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:38:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601262,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601262', 'tblTempUsageDetail_20' ) start [2025-03-03 21:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601262', 'tblTempUsageDetail_20' ) end [2025-03-03 21:38:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:38:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:38:21] Production.INFO: ==32173== Releasing lock... [2025-03-03 21:38:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:38:21] Production.INFO: 36.75 MB #Memory Used# [2025-03-03 21:39:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:39:06 [end_date_ymd] => 2025-03-03 21:39:06 [RateCDR] => 1 ) [2025-03-03 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-03 18:39:06' and `end` < '2025-03-03 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-03 21:39:18] Production.INFO: count ==1127 [2025-03-03 21:39:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:39:06 - End Time 2025-03-03 21:39:06 [2025-03-03 21:39:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601267', 'tblTempUsageDetail_20' ) start [2025-03-03 21:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601267', 'tblTempUsageDetail_20' ) end [2025-03-03 21:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601267', 'tblTempVendorCDR_20' ) start [2025-03-03 21:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601267', 'tblTempVendorCDR_20' ) end [2025-03-03 21:39:18] Production.INFO: ProcessCDR(1,14601267,1,1,2) [2025-03-03 21:39:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601267,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:39:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601267,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:39:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601267,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:39:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601267,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:39:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601267', 'tblTempUsageDetail_20' ) start [2025-03-03 21:39:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601267', 'tblTempUsageDetail_20' ) end [2025-03-03 21:39:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:39:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:39:21] Production.INFO: ==32248== Releasing lock... [2025-03-03 21:39:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:39:21] Production.INFO: 36.5 MB #Memory Used# [2025-03-03 21:40:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:40:05 [end_date_ymd] => 2025-03-03 21:40:05 [RateCDR] => 1 ) [2025-03-03 21: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-03 18:40:05' and `end` < '2025-03-03 21: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-03 21:40:17] Production.INFO: count ==1127 [2025-03-03 21:40:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:40:05 - End Time 2025-03-03 21:40:05 [2025-03-03 21:40:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601272', 'tblTempUsageDetail_20' ) start [2025-03-03 21:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601272', 'tblTempUsageDetail_20' ) end [2025-03-03 21:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601272', 'tblTempVendorCDR_20' ) start [2025-03-03 21:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601272', 'tblTempVendorCDR_20' ) end [2025-03-03 21:40:18] Production.INFO: ProcessCDR(1,14601272,1,1,2) [2025-03-03 21:40:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601272,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:40:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601272,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:40:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601272,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:40:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601272,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:40:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601272', 'tblTempUsageDetail_20' ) start [2025-03-03 21:40:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601272', 'tblTempUsageDetail_20' ) end [2025-03-03 21:40:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:40:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:40:21] Production.INFO: ==32320== Releasing lock... [2025-03-03 21:40:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:40:21] Production.INFO: 36.5 MB #Memory Used# [2025-03-03 21:41:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:41:06 [end_date_ymd] => 2025-03-03 21:41:06 [RateCDR] => 1 ) [2025-03-03 21: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-03 18:41:06' and `end` < '2025-03-03 21: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-03 21:41:18] Production.INFO: count ==1084 [2025-03-03 21:41:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:41:06 - End Time 2025-03-03 21:41:06 [2025-03-03 21:41:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601278', 'tblTempUsageDetail_20' ) start [2025-03-03 21:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601278', 'tblTempUsageDetail_20' ) end [2025-03-03 21:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601278', 'tblTempVendorCDR_20' ) start [2025-03-03 21:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601278', 'tblTempVendorCDR_20' ) end [2025-03-03 21:41:18] Production.INFO: ProcessCDR(1,14601278,1,1,2) [2025-03-03 21:41:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601278,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:41:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601278,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:41:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601278,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:41:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601278,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:41:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601278', 'tblTempUsageDetail_20' ) start [2025-03-03 21:41:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601278', 'tblTempUsageDetail_20' ) end [2025-03-03 21:41:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:41:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:41:23] Production.INFO: ==32395== Releasing lock... [2025-03-03 21:41:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:41:23] Production.INFO: 36 MB #Memory Used# [2025-03-03 21:42:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:42:05 [end_date_ymd] => 2025-03-03 21:42:05 [RateCDR] => 1 ) [2025-03-03 21: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-03 18:42:05' and `end` < '2025-03-03 21: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-03 21:42:17] Production.INFO: count ==1085 [2025-03-03 21:42:17] Production.ERROR: pbx CDR StartTime 2025-03-03 18:42:05 - End Time 2025-03-03 21:42:05 [2025-03-03 21:42:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601283', 'tblTempUsageDetail_20' ) start [2025-03-03 21:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601283', 'tblTempUsageDetail_20' ) end [2025-03-03 21:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601283', 'tblTempVendorCDR_20' ) start [2025-03-03 21:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601283', 'tblTempVendorCDR_20' ) end [2025-03-03 21:42:17] Production.INFO: ProcessCDR(1,14601283,1,1,2) [2025-03-03 21:42:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601283,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:42:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601283,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:42:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601283,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:42:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601283,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:42:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601283', 'tblTempUsageDetail_20' ) start [2025-03-03 21:42:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601283', 'tblTempUsageDetail_20' ) end [2025-03-03 21:42:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:42:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:42:22] Production.INFO: ==32476== Releasing lock... [2025-03-03 21:42:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:42:22] Production.INFO: 36.25 MB #Memory Used# [2025-03-03 21:43:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:43:06 [end_date_ymd] => 2025-03-03 21:43:06 [RateCDR] => 1 ) [2025-03-03 21: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-03 18:43:06' and `end` < '2025-03-03 21: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-03 21:43:18] Production.INFO: count ==1085 [2025-03-03 21:43:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:43:06 - End Time 2025-03-03 21:43:06 [2025-03-03 21:43:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601288', 'tblTempUsageDetail_20' ) start [2025-03-03 21:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601288', 'tblTempUsageDetail_20' ) end [2025-03-03 21:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601288', 'tblTempVendorCDR_20' ) start [2025-03-03 21:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601288', 'tblTempVendorCDR_20' ) end [2025-03-03 21:43:18] Production.INFO: ProcessCDR(1,14601288,1,1,2) [2025-03-03 21:43:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601288,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:43:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601288,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:43:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601288,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:43:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601288,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:43:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601288', 'tblTempUsageDetail_20' ) start [2025-03-03 21:43:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601288', 'tblTempUsageDetail_20' ) end [2025-03-03 21:43:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:43:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:43:22] Production.INFO: ==32586== Releasing lock... [2025-03-03 21:43:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:43:22] Production.INFO: 36.25 MB #Memory Used# [2025-03-03 21:44:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:44:05 [end_date_ymd] => 2025-03-03 21:44:05 [RateCDR] => 1 ) [2025-03-03 21:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 18:44:05' and `end` < '2025-03-03 21: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-03 21:44:17] Production.INFO: count ==1084 [2025-03-03 21:44:17] Production.ERROR: pbx CDR StartTime 2025-03-03 18:44:05 - End Time 2025-03-03 21:44:05 [2025-03-03 21:44:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601293', 'tblTempUsageDetail_20' ) start [2025-03-03 21:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601293', 'tblTempUsageDetail_20' ) end [2025-03-03 21:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601293', 'tblTempVendorCDR_20' ) start [2025-03-03 21:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601293', 'tblTempVendorCDR_20' ) end [2025-03-03 21:44:17] Production.INFO: ProcessCDR(1,14601293,1,1,2) [2025-03-03 21:44:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601293,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:44:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601293,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:44:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601293,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:44:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601293,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601293', 'tblTempUsageDetail_20' ) start [2025-03-03 21:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601293', 'tblTempUsageDetail_20' ) end [2025-03-03 21:44:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:44:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:44:21] Production.INFO: ==32660== Releasing lock... [2025-03-03 21:44:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:44:21] Production.INFO: 36 MB #Memory Used# [2025-03-03 21:45:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:45:05 [end_date_ymd] => 2025-03-03 21:45:05 [RateCDR] => 1 ) [2025-03-03 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-03 18:45:05' and `end` < '2025-03-03 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-03 21:45:17] Production.INFO: count ==1080 [2025-03-03 21:45:17] Production.ERROR: pbx CDR StartTime 2025-03-03 18:45:05 - End Time 2025-03-03 21:45:05 [2025-03-03 21:45:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601298', 'tblTempUsageDetail_20' ) start [2025-03-03 21:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601298', 'tblTempUsageDetail_20' ) end [2025-03-03 21:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601298', 'tblTempVendorCDR_20' ) start [2025-03-03 21:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601298', 'tblTempVendorCDR_20' ) end [2025-03-03 21:45:17] Production.INFO: ProcessCDR(1,14601298,1,1,2) [2025-03-03 21:45:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601298,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:45:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601298,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:45:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601298,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:45:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601298,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:45:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601298', 'tblTempUsageDetail_20' ) start [2025-03-03 21:45:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601298', 'tblTempUsageDetail_20' ) end [2025-03-03 21:45:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:45:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:45:21] Production.INFO: ==32732== Releasing lock... [2025-03-03 21:45:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:45:21] Production.INFO: 36.25 MB #Memory Used# [2025-03-03 21:46:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:46:05 [end_date_ymd] => 2025-03-03 21:46:05 [RateCDR] => 1 ) [2025-03-03 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-03 18:46:05' and `end` < '2025-03-03 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-03 21:46:17] Production.INFO: count ==1080 [2025-03-03 21:46:17] Production.ERROR: pbx CDR StartTime 2025-03-03 18:46:05 - End Time 2025-03-03 21:46:05 [2025-03-03 21:46:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601303', 'tblTempUsageDetail_20' ) start [2025-03-03 21:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601303', 'tblTempUsageDetail_20' ) end [2025-03-03 21:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601303', 'tblTempVendorCDR_20' ) start [2025-03-03 21:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601303', 'tblTempVendorCDR_20' ) end [2025-03-03 21:46:17] Production.INFO: ProcessCDR(1,14601303,1,1,2) [2025-03-03 21:46:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601303,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:46:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601303,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:46:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601303,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:46:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601303,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601303', 'tblTempUsageDetail_20' ) start [2025-03-03 21:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601303', 'tblTempUsageDetail_20' ) end [2025-03-03 21:46:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:46:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:46:21] Production.INFO: ==354== Releasing lock... [2025-03-03 21:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:46:21] Production.INFO: 36.25 MB #Memory Used# [2025-03-03 21:47:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:47:05 [end_date_ymd] => 2025-03-03 21:47:05 [RateCDR] => 1 ) [2025-03-03 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-03 18:47:05' and `end` < '2025-03-03 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-03 21:47:17] Production.INFO: count ==1083 [2025-03-03 21:47:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:47:05 - End Time 2025-03-03 21:47:05 [2025-03-03 21:47:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601308', 'tblTempUsageDetail_20' ) start [2025-03-03 21:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601308', 'tblTempUsageDetail_20' ) end [2025-03-03 21:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601308', 'tblTempVendorCDR_20' ) start [2025-03-03 21:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601308', 'tblTempVendorCDR_20' ) end [2025-03-03 21:47:18] Production.INFO: ProcessCDR(1,14601308,1,1,2) [2025-03-03 21:47:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601308,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:47:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601308,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:47:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601308,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:47:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601308,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:47:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601308', 'tblTempUsageDetail_20' ) start [2025-03-03 21:47:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601308', 'tblTempUsageDetail_20' ) end [2025-03-03 21:47:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:47:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:47:22] Production.INFO: ==425== Releasing lock... [2025-03-03 21:47:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:47:22] Production.INFO: 36.25 MB #Memory Used# [2025-03-03 21:48:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:48:05 [end_date_ymd] => 2025-03-03 21:48:05 [RateCDR] => 1 ) [2025-03-03 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-03 18:48:05' and `end` < '2025-03-03 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-03 21:48:17] Production.INFO: count ==1080 [2025-03-03 21:48:17] Production.ERROR: pbx CDR StartTime 2025-03-03 18:48:05 - End Time 2025-03-03 21:48:05 [2025-03-03 21:48:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601313', 'tblTempUsageDetail_20' ) start [2025-03-03 21:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601313', 'tblTempUsageDetail_20' ) end [2025-03-03 21:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601313', 'tblTempVendorCDR_20' ) start [2025-03-03 21:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601313', 'tblTempVendorCDR_20' ) end [2025-03-03 21:48:17] Production.INFO: ProcessCDR(1,14601313,1,1,2) [2025-03-03 21:48:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601313,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:48:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601313,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:48:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601313,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:48:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601313,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:48:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601313', 'tblTempUsageDetail_20' ) start [2025-03-03 21:48:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601313', 'tblTempUsageDetail_20' ) end [2025-03-03 21:48:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:48:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:48:21] Production.INFO: ==498== Releasing lock... [2025-03-03 21:48:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:48:21] Production.INFO: 36.25 MB #Memory Used# [2025-03-03 21:49:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:49:06 [end_date_ymd] => 2025-03-03 21:49:06 [RateCDR] => 1 ) [2025-03-03 21: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-03 18:49:06' and `end` < '2025-03-03 21: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-03 21:49:18] Production.INFO: count ==1076 [2025-03-03 21:49:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:49:06 - End Time 2025-03-03 21:49:06 [2025-03-03 21:49:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601318', 'tblTempUsageDetail_20' ) start [2025-03-03 21:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601318', 'tblTempUsageDetail_20' ) end [2025-03-03 21:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601318', 'tblTempVendorCDR_20' ) start [2025-03-03 21:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601318', 'tblTempVendorCDR_20' ) end [2025-03-03 21:49:18] Production.INFO: ProcessCDR(1,14601318,1,1,2) [2025-03-03 21:49:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601318,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:49:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601318,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:49:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601318,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:49:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601318,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:49:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601318', 'tblTempUsageDetail_20' ) start [2025-03-03 21:49:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601318', 'tblTempUsageDetail_20' ) end [2025-03-03 21:49:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:49:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:49:21] Production.INFO: ==571== Releasing lock... [2025-03-03 21:49:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:49:21] Production.INFO: 35.75 MB #Memory Used# [2025-03-03 21:50:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:50:06 [end_date_ymd] => 2025-03-03 21:50:06 [RateCDR] => 1 ) [2025-03-03 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-03 18:50:06' and `end` < '2025-03-03 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-03 21:50:18] Production.INFO: count ==1070 [2025-03-03 21:50:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:50:06 - End Time 2025-03-03 21:50:06 [2025-03-03 21:50:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601324', 'tblTempUsageDetail_20' ) start [2025-03-03 21:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601324', 'tblTempUsageDetail_20' ) end [2025-03-03 21:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601324', 'tblTempVendorCDR_20' ) start [2025-03-03 21:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601324', 'tblTempVendorCDR_20' ) end [2025-03-03 21:50:18] Production.INFO: ProcessCDR(1,14601324,1,1,2) [2025-03-03 21:50:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601324,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:50:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601324,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:50:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601324,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:50:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601324,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:50:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601324', 'tblTempUsageDetail_20' ) start [2025-03-03 21:50:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601324', 'tblTempUsageDetail_20' ) end [2025-03-03 21:50:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:50:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:50:23] Production.INFO: ==653== Releasing lock... [2025-03-03 21:50:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:50:23] Production.INFO: 36 MB #Memory Used# [2025-03-03 21:51:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:51:06 [end_date_ymd] => 2025-03-03 21:51:06 [RateCDR] => 1 ) [2025-03-03 21: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-03 18:51:06' and `end` < '2025-03-03 21: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-03 21:51:18] Production.INFO: count ==1033 [2025-03-03 21:51:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:51:06 - End Time 2025-03-03 21:51:06 [2025-03-03 21:51:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601329', 'tblTempUsageDetail_20' ) start [2025-03-03 21:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601329', 'tblTempUsageDetail_20' ) end [2025-03-03 21:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601329', 'tblTempVendorCDR_20' ) start [2025-03-03 21:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601329', 'tblTempVendorCDR_20' ) end [2025-03-03 21:51:18] Production.INFO: ProcessCDR(1,14601329,1,1,2) [2025-03-03 21:51:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601329,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:51:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601329,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:51:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601329,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:51:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601329,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:51:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601329', 'tblTempUsageDetail_20' ) start [2025-03-03 21:51:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601329', 'tblTempUsageDetail_20' ) end [2025-03-03 21:51:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:51:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:51:23] Production.INFO: ==754== Releasing lock... [2025-03-03 21:51:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:51:23] Production.INFO: 36.25 MB #Memory Used# [2025-03-03 21:52:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:52:05 [end_date_ymd] => 2025-03-03 21:52:05 [RateCDR] => 1 ) [2025-03-03 21: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-03 18:52:05' and `end` < '2025-03-03 21: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-03 21:52:17] Production.INFO: count ==1027 [2025-03-03 21:52:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:52:05 - End Time 2025-03-03 21:52:05 [2025-03-03 21:52:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601334', 'tblTempUsageDetail_20' ) start [2025-03-03 21:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601334', 'tblTempUsageDetail_20' ) end [2025-03-03 21:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601334', 'tblTempVendorCDR_20' ) start [2025-03-03 21:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601334', 'tblTempVendorCDR_20' ) end [2025-03-03 21:52:18] Production.INFO: ProcessCDR(1,14601334,1,1,2) [2025-03-03 21:52:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601334,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:52:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601334,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:52:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601334,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:52:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601334,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:52:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601334', 'tblTempUsageDetail_20' ) start [2025-03-03 21:52:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601334', 'tblTempUsageDetail_20' ) end [2025-03-03 21:52:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:52:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:52:21] Production.INFO: ==823== Releasing lock... [2025-03-03 21:52:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:52:21] Production.INFO: 36 MB #Memory Used# [2025-03-03 21:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:53:05 [end_date_ymd] => 2025-03-03 21:53:05 [RateCDR] => 1 ) [2025-03-03 21:53:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 18:53:05' and `end` < '2025-03-03 21:53:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 21:53:17] Production.INFO: count ==1026 [2025-03-03 21:53:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:53:05 - End Time 2025-03-03 21:53:05 [2025-03-03 21:53:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:53:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601339', 'tblTempUsageDetail_20' ) start [2025-03-03 21:53:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601339', 'tblTempUsageDetail_20' ) end [2025-03-03 21:53:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601339', 'tblTempVendorCDR_20' ) start [2025-03-03 21:53:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601339', 'tblTempVendorCDR_20' ) end [2025-03-03 21:53:18] Production.INFO: ProcessCDR(1,14601339,1,1,2) [2025-03-03 21:53:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601339,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:53:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601339,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:53:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601339,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:53:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601339,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601339', 'tblTempUsageDetail_20' ) start [2025-03-03 21:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601339', 'tblTempUsageDetail_20' ) end [2025-03-03 21:53:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:53:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:53:21] Production.INFO: ==894== Releasing lock... [2025-03-03 21:53:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:53:21] Production.INFO: 35.5 MB #Memory Used# [2025-03-03 21:54:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:54:05 [end_date_ymd] => 2025-03-03 21:54:05 [RateCDR] => 1 ) [2025-03-03 21:54:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 18:54:05' and `end` < '2025-03-03 21:54:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 21:54:18] Production.INFO: count ==1028 [2025-03-03 21:54:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:54:05 - End Time 2025-03-03 21:54:05 [2025-03-03 21:54:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601344', 'tblTempUsageDetail_20' ) start [2025-03-03 21:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601344', 'tblTempUsageDetail_20' ) end [2025-03-03 21:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601344', 'tblTempVendorCDR_20' ) start [2025-03-03 21:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601344', 'tblTempVendorCDR_20' ) end [2025-03-03 21:54:18] Production.INFO: ProcessCDR(1,14601344,1,1,2) [2025-03-03 21:54:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601344,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:54:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601344,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:54:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601344,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:54:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601344,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:54:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601344', 'tblTempUsageDetail_20' ) start [2025-03-03 21:54:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601344', 'tblTempUsageDetail_20' ) end [2025-03-03 21:54:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:54:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:54:21] Production.INFO: ==968== Releasing lock... [2025-03-03 21:54:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:54:21] Production.INFO: 36 MB #Memory Used# [2025-03-03 21:55:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:55:05 [end_date_ymd] => 2025-03-03 21:55:05 [RateCDR] => 1 ) [2025-03-03 21:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 18:55:05' and `end` < '2025-03-03 21:55:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 21:55:17] Production.INFO: count ==1028 [2025-03-03 21:55:17] Production.ERROR: pbx CDR StartTime 2025-03-03 18:55:05 - End Time 2025-03-03 21:55:05 [2025-03-03 21:55:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601349', 'tblTempUsageDetail_20' ) start [2025-03-03 21:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601349', 'tblTempUsageDetail_20' ) end [2025-03-03 21:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601349', 'tblTempVendorCDR_20' ) start [2025-03-03 21:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601349', 'tblTempVendorCDR_20' ) end [2025-03-03 21:55:17] Production.INFO: ProcessCDR(1,14601349,1,1,2) [2025-03-03 21:55:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601349,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:55:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601349,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:55:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601349,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:55:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601349,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601349', 'tblTempUsageDetail_20' ) start [2025-03-03 21:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601349', 'tblTempUsageDetail_20' ) end [2025-03-03 21:55:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:55:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:55:21] Production.INFO: ==1043== Releasing lock... [2025-03-03 21:55:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:55:21] Production.INFO: 36 MB #Memory Used# [2025-03-03 21:56:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:56:06 [end_date_ymd] => 2025-03-03 21:56:06 [RateCDR] => 1 ) [2025-03-03 21:56:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 18:56:06' and `end` < '2025-03-03 21:56:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 21:56:18] Production.INFO: count ==1027 [2025-03-03 21:56:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:56:06 - End Time 2025-03-03 21:56:06 [2025-03-03 21:56:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601354', 'tblTempUsageDetail_20' ) start [2025-03-03 21:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601354', 'tblTempUsageDetail_20' ) end [2025-03-03 21:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601354', 'tblTempVendorCDR_20' ) start [2025-03-03 21:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601354', 'tblTempVendorCDR_20' ) end [2025-03-03 21:56:18] Production.INFO: ProcessCDR(1,14601354,1,1,2) [2025-03-03 21:56:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601354,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:56:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601354,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:56:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601354,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:56:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601354,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:56:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601354', 'tblTempUsageDetail_20' ) start [2025-03-03 21:56:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601354', 'tblTempUsageDetail_20' ) end [2025-03-03 21:56:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:56:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:56:22] Production.INFO: ==1115== Releasing lock... [2025-03-03 21:56:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:56:22] Production.INFO: 35.75 MB #Memory Used# [2025-03-03 21:57:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:57:05 [end_date_ymd] => 2025-03-03 21:57:05 [RateCDR] => 1 ) [2025-03-03 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-03 18:57:05' and `end` < '2025-03-03 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-03 21:57:17] Production.INFO: count ==1026 [2025-03-03 21:57:17] Production.ERROR: pbx CDR StartTime 2025-03-03 18:57:05 - End Time 2025-03-03 21:57:05 [2025-03-03 21:57:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601359', 'tblTempUsageDetail_20' ) start [2025-03-03 21:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601359', 'tblTempUsageDetail_20' ) end [2025-03-03 21:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601359', 'tblTempVendorCDR_20' ) start [2025-03-03 21:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601359', 'tblTempVendorCDR_20' ) end [2025-03-03 21:57:17] Production.INFO: ProcessCDR(1,14601359,1,1,2) [2025-03-03 21:57:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601359,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:57:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601359,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:57:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601359,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:57:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601359,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:57:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601359', 'tblTempUsageDetail_20' ) start [2025-03-03 21:57:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601359', 'tblTempUsageDetail_20' ) end [2025-03-03 21:57:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:57:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:57:21] Production.INFO: ==1194== Releasing lock... [2025-03-03 21:57:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:57:21] Production.INFO: 35.5 MB #Memory Used# [2025-03-03 21:58:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:58:05 [end_date_ymd] => 2025-03-03 21:58:05 [RateCDR] => 1 ) [2025-03-03 21:58:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 18:58:05' and `end` < '2025-03-03 21: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-03 21:58:17] Production.INFO: count ==1025 [2025-03-03 21:58:17] Production.ERROR: pbx CDR StartTime 2025-03-03 18:58:05 - End Time 2025-03-03 21:58:05 [2025-03-03 21:58:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601364', 'tblTempUsageDetail_20' ) start [2025-03-03 21:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601364', 'tblTempUsageDetail_20' ) end [2025-03-03 21:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601364', 'tblTempVendorCDR_20' ) start [2025-03-03 21:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601364', 'tblTempVendorCDR_20' ) end [2025-03-03 21:58:18] Production.INFO: ProcessCDR(1,14601364,1,1,2) [2025-03-03 21:58:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601364,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:58:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601364,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:58:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601364,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:58:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601364,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:58:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601364', 'tblTempUsageDetail_20' ) start [2025-03-03 21:58:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601364', 'tblTempUsageDetail_20' ) end [2025-03-03 21:58:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:58:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:58:22] Production.INFO: ==1278== Releasing lock... [2025-03-03 21:58:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:58:22] Production.INFO: 35.75 MB #Memory Used# [2025-03-03 21:59:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 18:59:05 [end_date_ymd] => 2025-03-03 21:59:05 [RateCDR] => 1 ) [2025-03-03 21:59:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 18:59:05' and `end` < '2025-03-03 21: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-03 21:59:17] Production.INFO: count ==1023 [2025-03-03 21:59:18] Production.ERROR: pbx CDR StartTime 2025-03-03 18:59:05 - End Time 2025-03-03 21:59:05 [2025-03-03 21:59:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 21:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601369', 'tblTempUsageDetail_20' ) start [2025-03-03 21:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601369', 'tblTempUsageDetail_20' ) end [2025-03-03 21:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601369', 'tblTempVendorCDR_20' ) start [2025-03-03 21:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601369', 'tblTempVendorCDR_20' ) end [2025-03-03 21:59:18] Production.INFO: ProcessCDR(1,14601369,1,1,2) [2025-03-03 21:59:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601369,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:59:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601369,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 21:59:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601369,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:59:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601369,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 21:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601369', 'tblTempUsageDetail_20' ) start [2025-03-03 21:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601369', 'tblTempUsageDetail_20' ) end [2025-03-03 21:59:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 21:59:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 21:59:21] Production.INFO: ==1389== Releasing lock... [2025-03-03 21:59:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 21:59:21] Production.INFO: 35.5 MB #Memory Used# [2025-03-03 22:00:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:00:07 [end_date_ymd] => 2025-03-03 22:00:07 [RateCDR] => 1 ) [2025-03-03 22: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-03 19:00:07' and `end` < '2025-03-03 22: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-03 22:00:19] Production.INFO: count ==1020 [2025-03-03 22:00:19] Production.ERROR: pbx CDR StartTime 2025-03-03 19:00:07 - End Time 2025-03-03 22:00:07 [2025-03-03 22:00:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:00:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601375', 'tblTempUsageDetail_20' ) start [2025-03-03 22:00:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601375', 'tblTempUsageDetail_20' ) end [2025-03-03 22:00:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601375', 'tblTempVendorCDR_20' ) start [2025-03-03 22:00:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601375', 'tblTempVendorCDR_20' ) end [2025-03-03 22:00:19] Production.INFO: ProcessCDR(1,14601375,1,1,2) [2025-03-03 22:00:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601375,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:00:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601375,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:00:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601375,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:00:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601375,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:00:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601375', 'tblTempUsageDetail_20' ) start [2025-03-03 22:00:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601375', 'tblTempUsageDetail_20' ) end [2025-03-03 22:00:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:00:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:00:22] Production.INFO: ==1463== Releasing lock... [2025-03-03 22:00:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:00:22] Production.INFO: 35.75 MB #Memory Used# [2025-03-03 22:01:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:01:05 [end_date_ymd] => 2025-03-03 22:01:05 [RateCDR] => 1 ) [2025-03-03 22:01:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 19:01:05' and `end` < '2025-03-03 22:01:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 22:01:17] Production.INFO: count ==1010 [2025-03-03 22:01:17] Production.ERROR: pbx CDR StartTime 2025-03-03 19:01:05 - End Time 2025-03-03 22:01:05 [2025-03-03 22:01:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601380', 'tblTempUsageDetail_20' ) start [2025-03-03 22:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601380', 'tblTempUsageDetail_20' ) end [2025-03-03 22:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601380', 'tblTempVendorCDR_20' ) start [2025-03-03 22:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601380', 'tblTempVendorCDR_20' ) end [2025-03-03 22:01:17] Production.INFO: ProcessCDR(1,14601380,1,1,2) [2025-03-03 22:01:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601380,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:01:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601380,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:01:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601380,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:01:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601380,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:01:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601380', 'tblTempUsageDetail_20' ) start [2025-03-03 22:01:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601380', 'tblTempUsageDetail_20' ) end [2025-03-03 22:01:20] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:01:20] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:01:20] Production.INFO: ==1586== Releasing lock... [2025-03-03 22:01:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:01:20] Production.INFO: 35.5 MB #Memory Used# [2025-03-03 22:02:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:02:06 [end_date_ymd] => 2025-03-03 22:02:06 [RateCDR] => 1 ) [2025-03-03 22: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-03 19:02:06' and `end` < '2025-03-03 22: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-03 22:02:18] Production.INFO: count ==1008 [2025-03-03 22:02:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:02:06 - End Time 2025-03-03 22:02:06 [2025-03-03 22:02:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601385', 'tblTempUsageDetail_20' ) start [2025-03-03 22:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601385', 'tblTempUsageDetail_20' ) end [2025-03-03 22:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601385', 'tblTempVendorCDR_20' ) start [2025-03-03 22:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601385', 'tblTempVendorCDR_20' ) end [2025-03-03 22:02:18] Production.INFO: ProcessCDR(1,14601385,1,1,2) [2025-03-03 22:02:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601385,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:02:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601385,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:02:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601385,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:02:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601385,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:02:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601385', 'tblTempUsageDetail_20' ) start [2025-03-03 22:02:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601385', 'tblTempUsageDetail_20' ) end [2025-03-03 22:02:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:02:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:02:21] Production.INFO: ==1662== Releasing lock... [2025-03-03 22:02:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:02:21] Production.INFO: 35.25 MB #Memory Used# [2025-03-03 22:03:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:03:05 [end_date_ymd] => 2025-03-03 22:03:05 [RateCDR] => 1 ) [2025-03-03 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-03 19:03:05' and `end` < '2025-03-03 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-03 22:03:17] Production.INFO: count ==1007 [2025-03-03 22:03:17] Production.ERROR: pbx CDR StartTime 2025-03-03 19:03:05 - End Time 2025-03-03 22:03:05 [2025-03-03 22:03:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601390', 'tblTempUsageDetail_20' ) start [2025-03-03 22:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601390', 'tblTempUsageDetail_20' ) end [2025-03-03 22:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601390', 'tblTempVendorCDR_20' ) start [2025-03-03 22:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601390', 'tblTempVendorCDR_20' ) end [2025-03-03 22:03:17] Production.INFO: ProcessCDR(1,14601390,1,1,2) [2025-03-03 22:03:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601390,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:03:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601390,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:03:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601390,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:03:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601390,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:03:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601390', 'tblTempUsageDetail_20' ) start [2025-03-03 22:03:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601390', 'tblTempUsageDetail_20' ) end [2025-03-03 22:03:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:03:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:03:21] Production.INFO: ==1732== Releasing lock... [2025-03-03 22:03:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:03:21] Production.INFO: 35.25 MB #Memory Used# [2025-03-03 22:04:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:04:06 [end_date_ymd] => 2025-03-03 22:04:06 [RateCDR] => 1 ) [2025-03-03 22: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-03 19:04:06' and `end` < '2025-03-03 22: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-03 22:04:18] Production.INFO: count ==1005 [2025-03-03 22:04:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:04:06 - End Time 2025-03-03 22:04:06 [2025-03-03 22:04:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:04:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601395', 'tblTempUsageDetail_20' ) start [2025-03-03 22:04:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601395', 'tblTempUsageDetail_20' ) end [2025-03-03 22:04:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601395', 'tblTempVendorCDR_20' ) start [2025-03-03 22:04:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601395', 'tblTempVendorCDR_20' ) end [2025-03-03 22:04:18] Production.INFO: ProcessCDR(1,14601395,1,1,2) [2025-03-03 22:04:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601395,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:04:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601395,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:04:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601395,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:04:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601395,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:04:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601395', 'tblTempUsageDetail_20' ) start [2025-03-03 22:04:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601395', 'tblTempUsageDetail_20' ) end [2025-03-03 22:04:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:04:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:04:22] Production.INFO: ==1807== Releasing lock... [2025-03-03 22:04:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:04:22] Production.INFO: 35.25 MB #Memory Used# [2025-03-03 22:05:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:05:05 [end_date_ymd] => 2025-03-03 22:05:05 [RateCDR] => 1 ) [2025-03-03 22:05:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 19:05:05' and `end` < '2025-03-03 22: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-03 22:05:17] Production.INFO: count ==1002 [2025-03-03 22:05:17] Production.ERROR: pbx CDR StartTime 2025-03-03 19:05:05 - End Time 2025-03-03 22:05:05 [2025-03-03 22:05:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601400', 'tblTempUsageDetail_20' ) start [2025-03-03 22:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601400', 'tblTempUsageDetail_20' ) end [2025-03-03 22:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601400', 'tblTempVendorCDR_20' ) start [2025-03-03 22:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601400', 'tblTempVendorCDR_20' ) end [2025-03-03 22:05:17] Production.INFO: ProcessCDR(1,14601400,1,1,2) [2025-03-03 22:05:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601400,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:05:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601400,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:05:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601400,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:05:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601400,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:05:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601400', 'tblTempUsageDetail_20' ) start [2025-03-03 22:05:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601400', 'tblTempUsageDetail_20' ) end [2025-03-03 22:05:20] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:05:20] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:05:20] Production.INFO: ==1879== Releasing lock... [2025-03-03 22:05:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:05:20] Production.INFO: 35.25 MB #Memory Used# [2025-03-03 22:06:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:06:06 [end_date_ymd] => 2025-03-03 22:06:06 [RateCDR] => 1 ) [2025-03-03 22: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-03 19:06:06' and `end` < '2025-03-03 22: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-03 22:06:18] Production.INFO: count ==1002 [2025-03-03 22:06:19] Production.ERROR: pbx CDR StartTime 2025-03-03 19:06:06 - End Time 2025-03-03 22:06:06 [2025-03-03 22:06:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:06:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601405', 'tblTempUsageDetail_20' ) start [2025-03-03 22:06:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601405', 'tblTempUsageDetail_20' ) end [2025-03-03 22:06:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601405', 'tblTempVendorCDR_20' ) start [2025-03-03 22:06:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601405', 'tblTempVendorCDR_20' ) end [2025-03-03 22:06:19] Production.INFO: ProcessCDR(1,14601405,1,1,2) [2025-03-03 22:06:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601405,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:06:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601405,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:06:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601405,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:06:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601405,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:06:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601405', 'tblTempUsageDetail_20' ) start [2025-03-03 22:06:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601405', 'tblTempUsageDetail_20' ) end [2025-03-03 22:06:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:06:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:06:23] Production.INFO: ==1949== Releasing lock... [2025-03-03 22:06:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:06:23] Production.INFO: 35.25 MB #Memory Used# [2025-03-03 22:07:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:07:06 [end_date_ymd] => 2025-03-03 22:07:06 [RateCDR] => 1 ) [2025-03-03 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-03 19:07:06' and `end` < '2025-03-03 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-03 22:07:18] Production.INFO: count ==998 [2025-03-03 22:07:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:07:06 - End Time 2025-03-03 22:07:06 [2025-03-03 22:07:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601410', 'tblTempUsageDetail_20' ) start [2025-03-03 22:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601410', 'tblTempUsageDetail_20' ) end [2025-03-03 22:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601410', 'tblTempVendorCDR_20' ) start [2025-03-03 22:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601410', 'tblTempVendorCDR_20' ) end [2025-03-03 22:07:18] Production.INFO: ProcessCDR(1,14601410,1,1,2) [2025-03-03 22:07:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601410,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:07:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601410,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:07:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601410,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:07:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601410,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:07:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601410', 'tblTempUsageDetail_20' ) start [2025-03-03 22:07:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601410', 'tblTempUsageDetail_20' ) end [2025-03-03 22:07:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:07:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:07:22] Production.INFO: ==2020== Releasing lock... [2025-03-03 22:07:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:07:22] Production.INFO: 36 MB #Memory Used# [2025-03-03 22:08:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:08:05 [end_date_ymd] => 2025-03-03 22:08:05 [RateCDR] => 1 ) [2025-03-03 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-03 19:08:05' and `end` < '2025-03-03 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-03 22:08:17] Production.INFO: count ==996 [2025-03-03 22:08:17] Production.ERROR: pbx CDR StartTime 2025-03-03 19:08:05 - End Time 2025-03-03 22:08:05 [2025-03-03 22:08:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601415', 'tblTempUsageDetail_20' ) start [2025-03-03 22:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601415', 'tblTempUsageDetail_20' ) end [2025-03-03 22:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601415', 'tblTempVendorCDR_20' ) start [2025-03-03 22:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601415', 'tblTempVendorCDR_20' ) end [2025-03-03 22:08:17] Production.INFO: ProcessCDR(1,14601415,1,1,2) [2025-03-03 22:08:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601415,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:08:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601415,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:08:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601415,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:08:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601415,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:08:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601415', 'tblTempUsageDetail_20' ) start [2025-03-03 22:08:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601415', 'tblTempUsageDetail_20' ) end [2025-03-03 22:08:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:08:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:08:21] Production.INFO: ==2092== Releasing lock... [2025-03-03 22:08:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:08:21] Production.INFO: 35.5 MB #Memory Used# [2025-03-03 22:09:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:09:05 [end_date_ymd] => 2025-03-03 22:09:05 [RateCDR] => 1 ) [2025-03-03 22:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 19:09:05' and `end` < '2025-03-03 22:09:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 22:09:17] Production.INFO: count ==982 [2025-03-03 22:09:17] Production.ERROR: pbx CDR StartTime 2025-03-03 19:09:05 - End Time 2025-03-03 22:09:05 [2025-03-03 22:09:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601420', 'tblTempUsageDetail_20' ) start [2025-03-03 22:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601420', 'tblTempUsageDetail_20' ) end [2025-03-03 22:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601420', 'tblTempVendorCDR_20' ) start [2025-03-03 22:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601420', 'tblTempVendorCDR_20' ) end [2025-03-03 22:09:17] Production.INFO: ProcessCDR(1,14601420,1,1,2) [2025-03-03 22:09:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601420,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:09:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601420,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:09:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601420,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:09:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601420,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:09:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601420', 'tblTempUsageDetail_20' ) start [2025-03-03 22:09:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601420', 'tblTempUsageDetail_20' ) end [2025-03-03 22:09:20] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:09:20] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:09:20] Production.INFO: ==2162== Releasing lock... [2025-03-03 22:09:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:09:20] Production.INFO: 35.25 MB #Memory Used# [2025-03-03 22:10:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:10:06 [end_date_ymd] => 2025-03-03 22:10:06 [RateCDR] => 1 ) [2025-03-03 22:10:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 19:10:06' and `end` < '2025-03-03 22:10:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 22:10:18] Production.INFO: count ==975 [2025-03-03 22:10:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:10:06 - End Time 2025-03-03 22:10:06 [2025-03-03 22:10:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601426', 'tblTempUsageDetail_20' ) start [2025-03-03 22:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601426', 'tblTempUsageDetail_20' ) end [2025-03-03 22:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601426', 'tblTempVendorCDR_20' ) start [2025-03-03 22:10:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601426', 'tblTempVendorCDR_20' ) end [2025-03-03 22:10:19] Production.INFO: ProcessCDR(1,14601426,1,1,2) [2025-03-03 22:10:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601426,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:10:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601426,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:10:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601426,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:10:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601426,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:10:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601426', 'tblTempUsageDetail_20' ) start [2025-03-03 22:10:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601426', 'tblTempUsageDetail_20' ) end [2025-03-03 22:10:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:10:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:10:23] Production.INFO: ==2243== Releasing lock... [2025-03-03 22:10:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:10:23] Production.INFO: 35.25 MB #Memory Used# [2025-03-03 22:11:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:11:05 [end_date_ymd] => 2025-03-03 22:11:05 [RateCDR] => 1 ) [2025-03-03 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-03 19:11:05' and `end` < '2025-03-03 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-03 22:11:17] Production.INFO: count ==935 [2025-03-03 22:11:17] Production.ERROR: pbx CDR StartTime 2025-03-03 19:11:05 - End Time 2025-03-03 22:11:05 [2025-03-03 22:11:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601431', 'tblTempUsageDetail_20' ) start [2025-03-03 22:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601431', 'tblTempUsageDetail_20' ) end [2025-03-03 22:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601431', 'tblTempVendorCDR_20' ) start [2025-03-03 22:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601431', 'tblTempVendorCDR_20' ) end [2025-03-03 22:11:17] Production.INFO: ProcessCDR(1,14601431,1,1,2) [2025-03-03 22:11:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601431,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:11:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601431,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:11:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601431,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:11:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601431,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:11:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601431', 'tblTempUsageDetail_20' ) start [2025-03-03 22:11:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601431', 'tblTempUsageDetail_20' ) end [2025-03-03 22:11:20] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:11:20] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:11:20] Production.INFO: ==2320== Releasing lock... [2025-03-03 22:11:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:11:20] Production.INFO: 34.75 MB #Memory Used# [2025-03-03 22:12:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:12:05 [end_date_ymd] => 2025-03-03 22:12:05 [RateCDR] => 1 ) [2025-03-03 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-03 19:12:05' and `end` < '2025-03-03 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-03 22:12:17] Production.INFO: count ==930 [2025-03-03 22:12:17] Production.ERROR: pbx CDR StartTime 2025-03-03 19:12:05 - End Time 2025-03-03 22:12:05 [2025-03-03 22:12:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601436', 'tblTempUsageDetail_20' ) start [2025-03-03 22:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601436', 'tblTempUsageDetail_20' ) end [2025-03-03 22:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601436', 'tblTempVendorCDR_20' ) start [2025-03-03 22:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601436', 'tblTempVendorCDR_20' ) end [2025-03-03 22:12:17] Production.INFO: ProcessCDR(1,14601436,1,1,2) [2025-03-03 22:12:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601436,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:12:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601436,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:12:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601436,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:12:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601436,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:12:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601436', 'tblTempUsageDetail_20' ) start [2025-03-03 22:12:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601436', 'tblTempUsageDetail_20' ) end [2025-03-03 22:12:20] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:12:20] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:12:20] Production.INFO: ==2391== Releasing lock... [2025-03-03 22:12:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:12:20] Production.INFO: 35 MB #Memory Used# [2025-03-03 22:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:13:05 [end_date_ymd] => 2025-03-03 22:13:05 [RateCDR] => 1 ) [2025-03-03 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-03 19:13:05' and `end` < '2025-03-03 22:13:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 22:13:17] Production.INFO: count ==918 [2025-03-03 22:13:17] Production.ERROR: pbx CDR StartTime 2025-03-03 19:13:05 - End Time 2025-03-03 22:13:05 [2025-03-03 22:13:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601441', 'tblTempUsageDetail_20' ) start [2025-03-03 22:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601441', 'tblTempUsageDetail_20' ) end [2025-03-03 22:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601441', 'tblTempVendorCDR_20' ) start [2025-03-03 22:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601441', 'tblTempVendorCDR_20' ) end [2025-03-03 22:13:17] Production.INFO: ProcessCDR(1,14601441,1,1,2) [2025-03-03 22:13:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601441,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:13:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601441,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:13:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601441,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:13:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601441,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:13:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601441', 'tblTempUsageDetail_20' ) start [2025-03-03 22:13:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601441', 'tblTempUsageDetail_20' ) end [2025-03-03 22:13:20] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:13:20] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:13:20] Production.INFO: ==2461== Releasing lock... [2025-03-03 22:13:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:13:20] Production.INFO: 34.75 MB #Memory Used# [2025-03-03 22:14:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:14:05 [end_date_ymd] => 2025-03-03 22:14:05 [RateCDR] => 1 ) [2025-03-03 22:14:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 19:14:05' and `end` < '2025-03-03 22: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-03 22:14:17] Production.INFO: count ==906 [2025-03-03 22:14:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:14:05 - End Time 2025-03-03 22:14:05 [2025-03-03 22:14:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601446', 'tblTempUsageDetail_20' ) start [2025-03-03 22:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601446', 'tblTempUsageDetail_20' ) end [2025-03-03 22:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601446', 'tblTempVendorCDR_20' ) start [2025-03-03 22:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601446', 'tblTempVendorCDR_20' ) end [2025-03-03 22:14:18] Production.INFO: ProcessCDR(1,14601446,1,1,2) [2025-03-03 22:14:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601446,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:14:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601446,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:14:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601446,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:14:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601446,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:14:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601446', 'tblTempUsageDetail_20' ) start [2025-03-03 22:14:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601446', 'tblTempUsageDetail_20' ) end [2025-03-03 22:14:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:14:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:14:21] Production.INFO: ==2572== Releasing lock... [2025-03-03 22:14:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:14:21] Production.INFO: 34.25 MB #Memory Used# [2025-03-03 22:15:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:15:05 [end_date_ymd] => 2025-03-03 22:15:05 [RateCDR] => 1 ) [2025-03-03 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-03 19:15:05' and `end` < '2025-03-03 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-03 22:15:17] Production.INFO: count ==894 [2025-03-03 22:15:17] Production.ERROR: pbx CDR StartTime 2025-03-03 19:15:05 - End Time 2025-03-03 22:15:05 [2025-03-03 22:15:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601451', 'tblTempUsageDetail_20' ) start [2025-03-03 22:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601451', 'tblTempUsageDetail_20' ) end [2025-03-03 22:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601451', 'tblTempVendorCDR_20' ) start [2025-03-03 22:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601451', 'tblTempVendorCDR_20' ) end [2025-03-03 22:15:17] Production.INFO: ProcessCDR(1,14601451,1,1,2) [2025-03-03 22:15:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601451,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:15:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601451,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:15:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601451,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:15:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601451,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:15:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601451', 'tblTempUsageDetail_20' ) start [2025-03-03 22:15:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601451', 'tblTempUsageDetail_20' ) end [2025-03-03 22:15:20] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:15:20] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:15:20] Production.INFO: ==2642== Releasing lock... [2025-03-03 22:15:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:15:20] Production.INFO: 34 MB #Memory Used# [2025-03-03 22:16:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:16:05 [end_date_ymd] => 2025-03-03 22:16:05 [RateCDR] => 1 ) [2025-03-03 22: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-03 19:16:05' and `end` < '2025-03-03 22: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-03 22:16:17] Production.INFO: count ==893 [2025-03-03 22:16:17] Production.ERROR: pbx CDR StartTime 2025-03-03 19:16:05 - End Time 2025-03-03 22:16:05 [2025-03-03 22:16:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601456', 'tblTempUsageDetail_20' ) start [2025-03-03 22:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601456', 'tblTempUsageDetail_20' ) end [2025-03-03 22:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601456', 'tblTempVendorCDR_20' ) start [2025-03-03 22:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601456', 'tblTempVendorCDR_20' ) end [2025-03-03 22:16:17] Production.INFO: ProcessCDR(1,14601456,1,1,2) [2025-03-03 22:16:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601456,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:16:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601456,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:16:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601456,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:16:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601456,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601456', 'tblTempUsageDetail_20' ) start [2025-03-03 22:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601456', 'tblTempUsageDetail_20' ) end [2025-03-03 22:16:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:16:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:16:21] Production.INFO: ==2714== Releasing lock... [2025-03-03 22:16:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:16:21] Production.INFO: 34.75 MB #Memory Used# [2025-03-03 22:17:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:17:04 [end_date_ymd] => 2025-03-03 22:17:04 [RateCDR] => 1 ) [2025-03-03 22:17:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 19:17:04' and `end` < '2025-03-03 22: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-03 22:17:17] Production.INFO: count ==894 [2025-03-03 22:17:17] Production.ERROR: pbx CDR StartTime 2025-03-03 19:17:04 - End Time 2025-03-03 22:17:04 [2025-03-03 22:17:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601461', 'tblTempUsageDetail_20' ) start [2025-03-03 22:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601461', 'tblTempUsageDetail_20' ) end [2025-03-03 22:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601461', 'tblTempVendorCDR_20' ) start [2025-03-03 22:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601461', 'tblTempVendorCDR_20' ) end [2025-03-03 22:17:17] Production.INFO: ProcessCDR(1,14601461,1,1,2) [2025-03-03 22:17:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601461,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:17:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601461,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:17:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601461,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:17:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601461,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:17:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601461', 'tblTempUsageDetail_20' ) start [2025-03-03 22:17:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601461', 'tblTempUsageDetail_20' ) end [2025-03-03 22:17:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:17:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:17:22] Production.INFO: ==2808== Releasing lock... [2025-03-03 22:17:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:17:22] Production.INFO: 34 MB #Memory Used# [2025-03-03 22:18:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:18:06 [end_date_ymd] => 2025-03-03 22:18:06 [RateCDR] => 1 ) [2025-03-03 22: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-03 19:18:06' and `end` < '2025-03-03 22: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-03 22:18:18] Production.INFO: count ==893 [2025-03-03 22:18:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:18:06 - End Time 2025-03-03 22:18:06 [2025-03-03 22:18:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601466', 'tblTempUsageDetail_20' ) start [2025-03-03 22:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601466', 'tblTempUsageDetail_20' ) end [2025-03-03 22:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601466', 'tblTempVendorCDR_20' ) start [2025-03-03 22:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601466', 'tblTempVendorCDR_20' ) end [2025-03-03 22:18:18] Production.INFO: ProcessCDR(1,14601466,1,1,2) [2025-03-03 22:18:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601466,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:18:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601466,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:18:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601466,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:18:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601466,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:18:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601466', 'tblTempUsageDetail_20' ) start [2025-03-03 22:18:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601466', 'tblTempUsageDetail_20' ) end [2025-03-03 22:18:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:18:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:18:22] Production.INFO: ==2879== Releasing lock... [2025-03-03 22:18:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:18:22] Production.INFO: 34 MB #Memory Used# [2025-03-03 22:19:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:19:05 [end_date_ymd] => 2025-03-03 22:19:05 [RateCDR] => 1 ) [2025-03-03 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-03 19:19:05' and `end` < '2025-03-03 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-03 22:19:17] Production.INFO: count ==884 [2025-03-03 22:19:17] Production.ERROR: pbx CDR StartTime 2025-03-03 19:19:05 - End Time 2025-03-03 22:19:05 [2025-03-03 22:19:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601471', 'tblTempUsageDetail_20' ) start [2025-03-03 22:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601471', 'tblTempUsageDetail_20' ) end [2025-03-03 22:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601471', 'tblTempVendorCDR_20' ) start [2025-03-03 22:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601471', 'tblTempVendorCDR_20' ) end [2025-03-03 22:19:17] Production.INFO: ProcessCDR(1,14601471,1,1,2) [2025-03-03 22:19:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601471,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:19:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601471,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:19:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601471,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:19:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601471,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:19:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601471', 'tblTempUsageDetail_20' ) start [2025-03-03 22:19:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601471', 'tblTempUsageDetail_20' ) end [2025-03-03 22:19:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:19:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:19:21] Production.INFO: ==2955== Releasing lock... [2025-03-03 22:19:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:19:21] Production.INFO: 34 MB #Memory Used# [2025-03-03 22:20:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:20:06 [end_date_ymd] => 2025-03-03 22:20:06 [RateCDR] => 1 ) [2025-03-03 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-03 19:20:06' and `end` < '2025-03-03 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-03 22:20:18] Production.INFO: count ==881 [2025-03-03 22:20:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:20:06 - End Time 2025-03-03 22:20:06 [2025-03-03 22:20:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601476', 'tblTempUsageDetail_20' ) start [2025-03-03 22:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601476', 'tblTempUsageDetail_20' ) end [2025-03-03 22:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601476', 'tblTempVendorCDR_20' ) start [2025-03-03 22:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601476', 'tblTempVendorCDR_20' ) end [2025-03-03 22:20:18] Production.INFO: ProcessCDR(1,14601476,1,1,2) [2025-03-03 22:20:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601476,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:20:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601476,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:20:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601476,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:20:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601476,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:20:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601476', 'tblTempUsageDetail_20' ) start [2025-03-03 22:20:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601476', 'tblTempUsageDetail_20' ) end [2025-03-03 22:20:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:20:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:20:21] Production.INFO: ==3026== Releasing lock... [2025-03-03 22:20:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:20:21] Production.INFO: 34 MB #Memory Used# [2025-03-03 22:21:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:21:05 [end_date_ymd] => 2025-03-03 22:21:05 [RateCDR] => 1 ) [2025-03-03 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-03 19:21:05' and `end` < '2025-03-03 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-03 22:21:17] Production.INFO: count ==850 [2025-03-03 22:21:17] Production.ERROR: pbx CDR StartTime 2025-03-03 19:21:05 - End Time 2025-03-03 22:21:05 [2025-03-03 22:21:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601482', 'tblTempUsageDetail_20' ) start [2025-03-03 22:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601482', 'tblTempUsageDetail_20' ) end [2025-03-03 22:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601482', 'tblTempVendorCDR_20' ) start [2025-03-03 22:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601482', 'tblTempVendorCDR_20' ) end [2025-03-03 22:21:17] Production.INFO: ProcessCDR(1,14601482,1,1,2) [2025-03-03 22:21:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601482,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:21:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601482,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:21:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601482,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:21:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601482,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:21:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601482', 'tblTempUsageDetail_20' ) start [2025-03-03 22:21:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601482', 'tblTempUsageDetail_20' ) end [2025-03-03 22:21:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:21:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:21:21] Production.INFO: ==3110== Releasing lock... [2025-03-03 22:21:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:21:21] Production.INFO: 34.5 MB #Memory Used# [2025-03-03 22:22:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:22:05 [end_date_ymd] => 2025-03-03 22:22:05 [RateCDR] => 1 ) [2025-03-03 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-03 19:22:05' and `end` < '2025-03-03 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-03 22:22:17] Production.INFO: count ==850 [2025-03-03 22:22:17] Production.ERROR: pbx CDR StartTime 2025-03-03 19:22:05 - End Time 2025-03-03 22:22:05 [2025-03-03 22:22:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601487', 'tblTempUsageDetail_20' ) start [2025-03-03 22:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601487', 'tblTempUsageDetail_20' ) end [2025-03-03 22:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601487', 'tblTempVendorCDR_20' ) start [2025-03-03 22:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601487', 'tblTempVendorCDR_20' ) end [2025-03-03 22:22:18] Production.INFO: ProcessCDR(1,14601487,1,1,2) [2025-03-03 22:22:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601487,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:22:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601487,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:22:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601487,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:22:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601487,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601487', 'tblTempUsageDetail_20' ) start [2025-03-03 22:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601487', 'tblTempUsageDetail_20' ) end [2025-03-03 22:22:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:22:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:22:21] Production.INFO: ==3186== Releasing lock... [2025-03-03 22:22:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:22:21] Production.INFO: 34.5 MB #Memory Used# [2025-03-03 22:23:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:23:05 [end_date_ymd] => 2025-03-03 22:23:05 [RateCDR] => 1 ) [2025-03-03 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-03 19:23:05' and `end` < '2025-03-03 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-03 22:23:17] Production.INFO: count ==845 [2025-03-03 22:23:17] Production.ERROR: pbx CDR StartTime 2025-03-03 19:23:05 - End Time 2025-03-03 22:23:05 [2025-03-03 22:23:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601492', 'tblTempUsageDetail_20' ) start [2025-03-03 22:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601492', 'tblTempUsageDetail_20' ) end [2025-03-03 22:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601492', 'tblTempVendorCDR_20' ) start [2025-03-03 22:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601492', 'tblTempVendorCDR_20' ) end [2025-03-03 22:23:17] Production.INFO: ProcessCDR(1,14601492,1,1,2) [2025-03-03 22:23:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601492,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:23:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601492,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:23:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601492,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:23:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601492,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:23:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601492', 'tblTempUsageDetail_20' ) start [2025-03-03 22:23:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601492', 'tblTempUsageDetail_20' ) end [2025-03-03 22:23:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:23:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:23:21] Production.INFO: ==3268== Releasing lock... [2025-03-03 22:23:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:23:21] Production.INFO: 34.25 MB #Memory Used# [2025-03-03 22:24:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:24:05 [end_date_ymd] => 2025-03-03 22:24:05 [RateCDR] => 1 ) [2025-03-03 22: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-03 19:24:05' and `end` < '2025-03-03 22: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-03 22:24:17] Production.INFO: count ==841 [2025-03-03 22:24:17] Production.ERROR: pbx CDR StartTime 2025-03-03 19:24:05 - End Time 2025-03-03 22:24:05 [2025-03-03 22:24:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601497', 'tblTempUsageDetail_20' ) start [2025-03-03 22:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601497', 'tblTempUsageDetail_20' ) end [2025-03-03 22:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601497', 'tblTempVendorCDR_20' ) start [2025-03-03 22:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601497', 'tblTempVendorCDR_20' ) end [2025-03-03 22:24:17] Production.INFO: ProcessCDR(1,14601497,1,1,2) [2025-03-03 22:24:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601497,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:24:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601497,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:24:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601497,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:24:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601497,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601497', 'tblTempUsageDetail_20' ) start [2025-03-03 22:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601497', 'tblTempUsageDetail_20' ) end [2025-03-03 22:24:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:24:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:24:21] Production.INFO: ==3340== Releasing lock... [2025-03-03 22:24:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:24:21] Production.INFO: 33.75 MB #Memory Used# [2025-03-03 22:25:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:25:06 [end_date_ymd] => 2025-03-03 22:25:06 [RateCDR] => 1 ) [2025-03-03 22: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-03 19:25:06' and `end` < '2025-03-03 22: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-03 22:25:18] Production.INFO: count ==839 [2025-03-03 22:25:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:25:06 - End Time 2025-03-03 22:25:06 [2025-03-03 22:25:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601502', 'tblTempUsageDetail_20' ) start [2025-03-03 22:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601502', 'tblTempUsageDetail_20' ) end [2025-03-03 22:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601502', 'tblTempVendorCDR_20' ) start [2025-03-03 22:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601502', 'tblTempVendorCDR_20' ) end [2025-03-03 22:25:18] Production.INFO: ProcessCDR(1,14601502,1,1,2) [2025-03-03 22:25:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601502,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:25:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601502,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:25:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601502,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:25:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601502,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601502', 'tblTempUsageDetail_20' ) start [2025-03-03 22:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601502', 'tblTempUsageDetail_20' ) end [2025-03-03 22:25:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:25:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:25:21] Production.INFO: ==3421== Releasing lock... [2025-03-03 22:25:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:25:21] Production.INFO: 34 MB #Memory Used# [2025-03-03 22:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:26:05 [end_date_ymd] => 2025-03-03 22:26:05 [RateCDR] => 1 ) [2025-03-03 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-03 19:26:05' and `end` < '2025-03-03 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-03 22:26:17] Production.INFO: count ==838 [2025-03-03 22:26:17] Production.ERROR: pbx CDR StartTime 2025-03-03 19:26:05 - End Time 2025-03-03 22:26:05 [2025-03-03 22:26:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601507', 'tblTempUsageDetail_20' ) start [2025-03-03 22:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601507', 'tblTempUsageDetail_20' ) end [2025-03-03 22:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601507', 'tblTempVendorCDR_20' ) start [2025-03-03 22:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601507', 'tblTempVendorCDR_20' ) end [2025-03-03 22:26:17] Production.INFO: ProcessCDR(1,14601507,1,1,2) [2025-03-03 22:26:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601507,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:26:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601507,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:26:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601507,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:26:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601507,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:26:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601507', 'tblTempUsageDetail_20' ) start [2025-03-03 22:26:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601507', 'tblTempUsageDetail_20' ) end [2025-03-03 22:26:20] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:26:20] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:26:20] Production.INFO: ==3499== Releasing lock... [2025-03-03 22:26:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:26:20] Production.INFO: 34.25 MB #Memory Used# [2025-03-03 22:27:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:27:06 [end_date_ymd] => 2025-03-03 22:27:06 [RateCDR] => 1 ) [2025-03-03 22: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-03 19:27:06' and `end` < '2025-03-03 22: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-03 22:27:18] Production.INFO: count ==833 [2025-03-03 22:27:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:27:06 - End Time 2025-03-03 22:27:06 [2025-03-03 22:27:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:27:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601512', 'tblTempUsageDetail_20' ) start [2025-03-03 22:27:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601512', 'tblTempUsageDetail_20' ) end [2025-03-03 22:27:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601512', 'tblTempVendorCDR_20' ) start [2025-03-03 22:27:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601512', 'tblTempVendorCDR_20' ) end [2025-03-03 22:27:18] Production.INFO: ProcessCDR(1,14601512,1,1,2) [2025-03-03 22:27:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601512,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:27:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601512,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:27:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601512,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:27:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601512,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:27:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601512', 'tblTempUsageDetail_20' ) start [2025-03-03 22:27:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601512', 'tblTempUsageDetail_20' ) end [2025-03-03 22:27:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:27:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:27:22] Production.INFO: ==3576== Releasing lock... [2025-03-03 22:27:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:27:22] Production.INFO: 34 MB #Memory Used# [2025-03-03 22:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:28:05 [end_date_ymd] => 2025-03-03 22:28:05 [RateCDR] => 1 ) [2025-03-03 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-03 19:28:05' and `end` < '2025-03-03 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-03 22:28:17] Production.INFO: count ==824 [2025-03-03 22:28:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:28:05 - End Time 2025-03-03 22:28:05 [2025-03-03 22:28:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601517', 'tblTempUsageDetail_20' ) start [2025-03-03 22:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601517', 'tblTempUsageDetail_20' ) end [2025-03-03 22:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601517', 'tblTempVendorCDR_20' ) start [2025-03-03 22:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601517', 'tblTempVendorCDR_20' ) end [2025-03-03 22:28:18] Production.INFO: ProcessCDR(1,14601517,1,1,2) [2025-03-03 22:28:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601517,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:28:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601517,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:28:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601517,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:28:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601517,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:28:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601517', 'tblTempUsageDetail_20' ) start [2025-03-03 22:28:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601517', 'tblTempUsageDetail_20' ) end [2025-03-03 22:28:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:28:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:28:21] Production.INFO: ==3648== Releasing lock... [2025-03-03 22:28:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:28:21] Production.INFO: 33.75 MB #Memory Used# [2025-03-03 22:29:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:29:06 [end_date_ymd] => 2025-03-03 22:29:06 [RateCDR] => 1 ) [2025-03-03 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-03 19:29:06' and `end` < '2025-03-03 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-03 22:29:18] Production.INFO: count ==823 [2025-03-03 22:29:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:29:06 - End Time 2025-03-03 22:29:06 [2025-03-03 22:29:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601522', 'tblTempUsageDetail_20' ) start [2025-03-03 22:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601522', 'tblTempUsageDetail_20' ) end [2025-03-03 22:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601522', 'tblTempVendorCDR_20' ) start [2025-03-03 22:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601522', 'tblTempVendorCDR_20' ) end [2025-03-03 22:29:18] Production.INFO: ProcessCDR(1,14601522,1,1,2) [2025-03-03 22:29:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601522,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:29:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601522,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:29:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601522,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:29:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601522,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:29:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601522', 'tblTempUsageDetail_20' ) start [2025-03-03 22:29:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601522', 'tblTempUsageDetail_20' ) end [2025-03-03 22:29:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:29:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:29:22] Production.INFO: ==3730== Releasing lock... [2025-03-03 22:29:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:29:22] Production.INFO: 33.75 MB #Memory Used# [2025-03-03 22:30:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:30:06 [end_date_ymd] => 2025-03-03 22:30:06 [RateCDR] => 1 ) [2025-03-03 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-03 19:30:06' and `end` < '2025-03-03 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-03 22:30:18] Production.INFO: count ==827 [2025-03-03 22:30:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:30:06 - End Time 2025-03-03 22:30:06 [2025-03-03 22:30:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601528', 'tblTempUsageDetail_20' ) start [2025-03-03 22:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601528', 'tblTempUsageDetail_20' ) end [2025-03-03 22:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601528', 'tblTempVendorCDR_20' ) start [2025-03-03 22:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601528', 'tblTempVendorCDR_20' ) end [2025-03-03 22:30:18] Production.INFO: ProcessCDR(1,14601528,1,1,2) [2025-03-03 22:30:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601528,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:30:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601528,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:30:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601528,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:30:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601528,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:30:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601528', 'tblTempUsageDetail_20' ) start [2025-03-03 22:30:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601528', 'tblTempUsageDetail_20' ) end [2025-03-03 22:30:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:30:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:30:21] Production.INFO: ==3850== Releasing lock... [2025-03-03 22:30:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:30:21] Production.INFO: 33.75 MB #Memory Used# [2025-03-03 22:31:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:31:06 [end_date_ymd] => 2025-03-03 22:31:06 [RateCDR] => 1 ) [2025-03-03 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-03 19:31:06' and `end` < '2025-03-03 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-03 22:31:18] Production.INFO: count ==800 [2025-03-03 22:31:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:31:06 - End Time 2025-03-03 22:31:06 [2025-03-03 22:31:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601533', 'tblTempUsageDetail_20' ) start [2025-03-03 22:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601533', 'tblTempUsageDetail_20' ) end [2025-03-03 22:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601533', 'tblTempVendorCDR_20' ) start [2025-03-03 22:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601533', 'tblTempVendorCDR_20' ) end [2025-03-03 22:31:18] Production.INFO: ProcessCDR(1,14601533,1,1,2) [2025-03-03 22:31:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601533,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:31:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601533,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:31:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601533,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:31:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601533,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:31:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601533', 'tblTempUsageDetail_20' ) start [2025-03-03 22:31:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601533', 'tblTempUsageDetail_20' ) end [2025-03-03 22:31:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:31:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:31:21] Production.INFO: ==3929== Releasing lock... [2025-03-03 22:31:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:31:21] Production.INFO: 33.75 MB #Memory Used# [2025-03-03 22:32:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:32:05 [end_date_ymd] => 2025-03-03 22:32:05 [RateCDR] => 1 ) [2025-03-03 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-03 19:32:05' and `end` < '2025-03-03 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-03 22:32:17] Production.INFO: count ==798 [2025-03-03 22:32:17] Production.ERROR: pbx CDR StartTime 2025-03-03 19:32:05 - End Time 2025-03-03 22:32:05 [2025-03-03 22:32:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601538', 'tblTempUsageDetail_20' ) start [2025-03-03 22:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601538', 'tblTempUsageDetail_20' ) end [2025-03-03 22:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601538', 'tblTempVendorCDR_20' ) start [2025-03-03 22:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601538', 'tblTempVendorCDR_20' ) end [2025-03-03 22:32:17] Production.INFO: ProcessCDR(1,14601538,1,1,2) [2025-03-03 22:32:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601538,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:32:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601538,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:32:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601538,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:32:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601538,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:32:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601538', 'tblTempUsageDetail_20' ) start [2025-03-03 22:32:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601538', 'tblTempUsageDetail_20' ) end [2025-03-03 22:32:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:32:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:32:21] Production.INFO: ==4001== Releasing lock... [2025-03-03 22:32:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:32:21] Production.INFO: 33.75 MB #Memory Used# [2025-03-03 22:33:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:33:06 [end_date_ymd] => 2025-03-03 22:33:06 [RateCDR] => 1 ) [2025-03-03 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-03 19:33:06' and `end` < '2025-03-03 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-03 22:33:18] Production.INFO: count ==797 [2025-03-03 22:33:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:33:06 - End Time 2025-03-03 22:33:06 [2025-03-03 22:33:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601543', 'tblTempUsageDetail_20' ) start [2025-03-03 22:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601543', 'tblTempUsageDetail_20' ) end [2025-03-03 22:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601543', 'tblTempVendorCDR_20' ) start [2025-03-03 22:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601543', 'tblTempVendorCDR_20' ) end [2025-03-03 22:33:18] Production.INFO: ProcessCDR(1,14601543,1,1,2) [2025-03-03 22:33:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601543,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:33:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601543,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:33:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601543,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:33:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601543,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:33:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601543', 'tblTempUsageDetail_20' ) start [2025-03-03 22:33:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601543', 'tblTempUsageDetail_20' ) end [2025-03-03 22:33:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:33:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:33:21] Production.INFO: ==4077== Releasing lock... [2025-03-03 22:33:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:33:21] Production.INFO: 33.75 MB #Memory Used# [2025-03-03 22:34:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:34:05 [end_date_ymd] => 2025-03-03 22:34:05 [RateCDR] => 1 ) [2025-03-03 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-03 19:34:05' and `end` < '2025-03-03 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-03 22:34:17] Production.INFO: count ==796 [2025-03-03 22:34:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:34:05 - End Time 2025-03-03 22:34:05 [2025-03-03 22:34:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601548', 'tblTempUsageDetail_20' ) start [2025-03-03 22:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601548', 'tblTempUsageDetail_20' ) end [2025-03-03 22:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601548', 'tblTempVendorCDR_20' ) start [2025-03-03 22:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601548', 'tblTempVendorCDR_20' ) end [2025-03-03 22:34:18] Production.INFO: ProcessCDR(1,14601548,1,1,2) [2025-03-03 22:34:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601548,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:34:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601548,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:34:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601548,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:34:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601548,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:34:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601548', 'tblTempUsageDetail_20' ) start [2025-03-03 22:34:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601548', 'tblTempUsageDetail_20' ) end [2025-03-03 22:34:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:34:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:34:21] Production.INFO: ==4155== Releasing lock... [2025-03-03 22:34:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:34:21] Production.INFO: 33.5 MB #Memory Used# [2025-03-03 22:35:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:35:06 [end_date_ymd] => 2025-03-03 22:35:06 [RateCDR] => 1 ) [2025-03-03 22: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-03 19:35:06' and `end` < '2025-03-03 22: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-03 22:35:18] Production.INFO: count ==789 [2025-03-03 22:35:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:35:06 - End Time 2025-03-03 22:35:06 [2025-03-03 22:35:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601553', 'tblTempUsageDetail_20' ) start [2025-03-03 22:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601553', 'tblTempUsageDetail_20' ) end [2025-03-03 22:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601553', 'tblTempVendorCDR_20' ) start [2025-03-03 22:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601553', 'tblTempVendorCDR_20' ) end [2025-03-03 22:35:18] Production.INFO: ProcessCDR(1,14601553,1,1,2) [2025-03-03 22:35:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601553,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:35:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601553,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:35:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601553,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:35:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601553,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:35:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601553', 'tblTempUsageDetail_20' ) start [2025-03-03 22:35:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601553', 'tblTempUsageDetail_20' ) end [2025-03-03 22:35:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:35:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:35:21] Production.INFO: ==4236== Releasing lock... [2025-03-03 22:35:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:35:21] Production.INFO: 33.5 MB #Memory Used# [2025-03-03 22:36:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:36:05 [end_date_ymd] => 2025-03-03 22:36:05 [RateCDR] => 1 ) [2025-03-03 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-03 19:36:05' and `end` < '2025-03-03 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-03 22:36:17] Production.INFO: count ==776 [2025-03-03 22:36:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:36:05 - End Time 2025-03-03 22:36:05 [2025-03-03 22:36:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:36:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601558', 'tblTempUsageDetail_20' ) start [2025-03-03 22:36:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601558', 'tblTempUsageDetail_20' ) end [2025-03-03 22:36:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601558', 'tblTempVendorCDR_20' ) start [2025-03-03 22:36:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601558', 'tblTempVendorCDR_20' ) end [2025-03-03 22:36:18] Production.INFO: ProcessCDR(1,14601558,1,1,2) [2025-03-03 22:36:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601558,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:36:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601558,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:36:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601558,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:36:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601558,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:36:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601558', 'tblTempUsageDetail_20' ) start [2025-03-03 22:36:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601558', 'tblTempUsageDetail_20' ) end [2025-03-03 22:36:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:36:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:36:22] Production.INFO: ==4326== Releasing lock... [2025-03-03 22:36:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:36:22] Production.INFO: 33.5 MB #Memory Used# [2025-03-03 22:37:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:37:06 [end_date_ymd] => 2025-03-03 22:37:06 [RateCDR] => 1 ) [2025-03-03 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-03 19:37:06' and `end` < '2025-03-03 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-03 22:37:18] Production.INFO: count ==759 [2025-03-03 22:37:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:37:06 - End Time 2025-03-03 22:37:06 [2025-03-03 22:37:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601563', 'tblTempUsageDetail_20' ) start [2025-03-03 22:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601563', 'tblTempUsageDetail_20' ) end [2025-03-03 22:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601563', 'tblTempVendorCDR_20' ) start [2025-03-03 22:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601563', 'tblTempVendorCDR_20' ) end [2025-03-03 22:37:18] Production.INFO: ProcessCDR(1,14601563,1,1,2) [2025-03-03 22:37:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601563,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:37:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601563,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:37:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601563,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:37:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601563,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601563', 'tblTempUsageDetail_20' ) start [2025-03-03 22:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601563', 'tblTempUsageDetail_20' ) end [2025-03-03 22:37:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:37:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:37:21] Production.INFO: ==4415== Releasing lock... [2025-03-03 22:37:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:37:21] Production.INFO: 33.5 MB #Memory Used# [2025-03-03 22:38:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:38:05 [end_date_ymd] => 2025-03-03 22:38:05 [RateCDR] => 1 ) [2025-03-03 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-03 19:38:05' and `end` < '2025-03-03 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-03 22:38:17] Production.INFO: count ==759 [2025-03-03 22:38:17] Production.ERROR: pbx CDR StartTime 2025-03-03 19:38:05 - End Time 2025-03-03 22:38:05 [2025-03-03 22:38:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601568', 'tblTempUsageDetail_20' ) start [2025-03-03 22:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601568', 'tblTempUsageDetail_20' ) end [2025-03-03 22:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601568', 'tblTempVendorCDR_20' ) start [2025-03-03 22:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601568', 'tblTempVendorCDR_20' ) end [2025-03-03 22:38:17] Production.INFO: ProcessCDR(1,14601568,1,1,2) [2025-03-03 22:38:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601568,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:38:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601568,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:38:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601568,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:38:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601568,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601568', 'tblTempUsageDetail_20' ) start [2025-03-03 22:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601568', 'tblTempUsageDetail_20' ) end [2025-03-03 22:38:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:38:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:38:21] Production.INFO: ==4498== Releasing lock... [2025-03-03 22:38:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:38:21] Production.INFO: 33.5 MB #Memory Used# [2025-03-03 22:39:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:39:06 [end_date_ymd] => 2025-03-03 22:39:06 [RateCDR] => 1 ) [2025-03-03 22:39:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 19:39:06' and `end` < '2025-03-03 22:39:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 22:39:18] Production.INFO: count ==756 [2025-03-03 22:39:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:39:06 - End Time 2025-03-03 22:39:06 [2025-03-03 22:39:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601573', 'tblTempUsageDetail_20' ) start [2025-03-03 22:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601573', 'tblTempUsageDetail_20' ) end [2025-03-03 22:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601573', 'tblTempVendorCDR_20' ) start [2025-03-03 22:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601573', 'tblTempVendorCDR_20' ) end [2025-03-03 22:39:18] Production.INFO: ProcessCDR(1,14601573,1,1,2) [2025-03-03 22:39:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601573,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:39:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601573,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:39:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601573,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:39:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601573,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:39:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601573', 'tblTempUsageDetail_20' ) start [2025-03-03 22:39:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601573', 'tblTempUsageDetail_20' ) end [2025-03-03 22:39:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:39:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:39:23] Production.INFO: ==4593== Releasing lock... [2025-03-03 22:39:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:39:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 22:40:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:40:05 [end_date_ymd] => 2025-03-03 22:40:05 [RateCDR] => 1 ) [2025-03-03 22:40:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 19:40:05' and `end` < '2025-03-03 22: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-03 22:40:17] Production.INFO: count ==759 [2025-03-03 22:40:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:40:05 - End Time 2025-03-03 22:40:05 [2025-03-03 22:40:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601578', 'tblTempUsageDetail_20' ) start [2025-03-03 22:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601578', 'tblTempUsageDetail_20' ) end [2025-03-03 22:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601578', 'tblTempVendorCDR_20' ) start [2025-03-03 22:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601578', 'tblTempVendorCDR_20' ) end [2025-03-03 22:40:18] Production.INFO: ProcessCDR(1,14601578,1,1,2) [2025-03-03 22:40:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601578,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:40:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601578,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:40:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601578,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:40:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601578,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:40:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601578', 'tblTempUsageDetail_20' ) start [2025-03-03 22:40:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601578', 'tblTempUsageDetail_20' ) end [2025-03-03 22:40:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:40:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:40:21] Production.INFO: ==4692== Releasing lock... [2025-03-03 22:40:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:40:21] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 22:41:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:41:05 [end_date_ymd] => 2025-03-03 22:41:05 [RateCDR] => 1 ) [2025-03-03 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-03 19:41:05' and `end` < '2025-03-03 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-03 22:41:17] Production.INFO: count ==756 [2025-03-03 22:41:17] Production.ERROR: pbx CDR StartTime 2025-03-03 19:41:05 - End Time 2025-03-03 22:41:05 [2025-03-03 22:41:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601584', 'tblTempUsageDetail_20' ) start [2025-03-03 22:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601584', 'tblTempUsageDetail_20' ) end [2025-03-03 22:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601584', 'tblTempVendorCDR_20' ) start [2025-03-03 22:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601584', 'tblTempVendorCDR_20' ) end [2025-03-03 22:41:17] Production.INFO: ProcessCDR(1,14601584,1,1,2) [2025-03-03 22:41:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601584,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:41:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601584,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:41:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601584,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:41:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601584,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:41:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601584', 'tblTempUsageDetail_20' ) start [2025-03-03 22:41:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601584', 'tblTempUsageDetail_20' ) end [2025-03-03 22:41:20] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:41:20] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:41:20] Production.INFO: ==4780== Releasing lock... [2025-03-03 22:41:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:41:20] Production.INFO: 33.5 MB #Memory Used# [2025-03-03 22:42:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:42:05 [end_date_ymd] => 2025-03-03 22:42:05 [RateCDR] => 1 ) [2025-03-03 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-03 19:42:05' and `end` < '2025-03-03 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-03 22:42:17] Production.INFO: count ==758 [2025-03-03 22:42:17] Production.ERROR: pbx CDR StartTime 2025-03-03 19:42:05 - End Time 2025-03-03 22:42:05 [2025-03-03 22:42:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601589', 'tblTempUsageDetail_20' ) start [2025-03-03 22:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601589', 'tblTempUsageDetail_20' ) end [2025-03-03 22:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601589', 'tblTempVendorCDR_20' ) start [2025-03-03 22:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601589', 'tblTempVendorCDR_20' ) end [2025-03-03 22:42:17] Production.INFO: ProcessCDR(1,14601589,1,1,2) [2025-03-03 22:42:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601589,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:42:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601589,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:42:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601589,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:42:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601589,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:42:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601589', 'tblTempUsageDetail_20' ) start [2025-03-03 22:42:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601589', 'tblTempUsageDetail_20' ) end [2025-03-03 22:42:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:42:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:42:22] Production.INFO: ==4858== Releasing lock... [2025-03-03 22:42:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:42:22] Production.INFO: 33 MB #Memory Used# [2025-03-03 22:43:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:43:06 [end_date_ymd] => 2025-03-03 22:43:06 [RateCDR] => 1 ) [2025-03-03 22: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-03 19:43:06' and `end` < '2025-03-03 22: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-03 22:43:17] Production.INFO: count ==756 [2025-03-03 22:43:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:43:06 - End Time 2025-03-03 22:43:06 [2025-03-03 22:43:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601594', 'tblTempUsageDetail_20' ) start [2025-03-03 22:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601594', 'tblTempUsageDetail_20' ) end [2025-03-03 22:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601594', 'tblTempVendorCDR_20' ) start [2025-03-03 22:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601594', 'tblTempVendorCDR_20' ) end [2025-03-03 22:43:18] Production.INFO: ProcessCDR(1,14601594,1,1,2) [2025-03-03 22:43:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601594,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:43:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601594,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:43:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601594,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:43:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601594,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:43:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601594', 'tblTempUsageDetail_20' ) start [2025-03-03 22:43:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601594', 'tblTempUsageDetail_20' ) end [2025-03-03 22:43:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:43:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:43:22] Production.INFO: ==4935== Releasing lock... [2025-03-03 22:43:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:43:22] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 22:44:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:44:06 [end_date_ymd] => 2025-03-03 22:44:06 [RateCDR] => 1 ) [2025-03-03 22: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-03 19:44:06' and `end` < '2025-03-03 22: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-03 22:44:18] Production.INFO: count ==756 [2025-03-03 22:44:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:44:06 - End Time 2025-03-03 22:44:06 [2025-03-03 22:44:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601599', 'tblTempUsageDetail_20' ) start [2025-03-03 22:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601599', 'tblTempUsageDetail_20' ) end [2025-03-03 22:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601599', 'tblTempVendorCDR_20' ) start [2025-03-03 22:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601599', 'tblTempVendorCDR_20' ) end [2025-03-03 22:44:18] Production.INFO: ProcessCDR(1,14601599,1,1,2) [2025-03-03 22:44:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601599,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:44:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601599,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:44:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601599,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:44:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601599,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601599', 'tblTempUsageDetail_20' ) start [2025-03-03 22:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601599', 'tblTempUsageDetail_20' ) end [2025-03-03 22:44:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:44:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:44:21] Production.INFO: ==5014== Releasing lock... [2025-03-03 22:44:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:44:21] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 22:45:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:45:05 [end_date_ymd] => 2025-03-03 22:45:05 [RateCDR] => 1 ) [2025-03-03 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-03 19:45:05' and `end` < '2025-03-03 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-03 22:45:17] Production.INFO: count ==756 [2025-03-03 22:45:17] Production.ERROR: pbx CDR StartTime 2025-03-03 19:45:05 - End Time 2025-03-03 22:45:05 [2025-03-03 22:45:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601604', 'tblTempUsageDetail_20' ) start [2025-03-03 22:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601604', 'tblTempUsageDetail_20' ) end [2025-03-03 22:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601604', 'tblTempVendorCDR_20' ) start [2025-03-03 22:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601604', 'tblTempVendorCDR_20' ) end [2025-03-03 22:45:17] Production.INFO: ProcessCDR(1,14601604,1,1,2) [2025-03-03 22:45:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601604,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:45:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601604,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:45:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601604,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:45:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601604,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:45:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601604', 'tblTempUsageDetail_20' ) start [2025-03-03 22:45:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601604', 'tblTempUsageDetail_20' ) end [2025-03-03 22:45:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:45:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:45:22] Production.INFO: ==5129== Releasing lock... [2025-03-03 22:45:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:45:22] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 22:46:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:46:06 [end_date_ymd] => 2025-03-03 22:46:06 [RateCDR] => 1 ) [2025-03-03 22: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-03 19:46:06' and `end` < '2025-03-03 22: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-03 22:46:18] Production.INFO: count ==748 [2025-03-03 22:46:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:46:06 - End Time 2025-03-03 22:46:06 [2025-03-03 22:46:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601609', 'tblTempUsageDetail_20' ) start [2025-03-03 22:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601609', 'tblTempUsageDetail_20' ) end [2025-03-03 22:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601609', 'tblTempVendorCDR_20' ) start [2025-03-03 22:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601609', 'tblTempVendorCDR_20' ) end [2025-03-03 22:46:18] Production.INFO: ProcessCDR(1,14601609,1,1,2) [2025-03-03 22:46:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601609,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:46:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601609,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:46:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601609,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:46:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601609,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601609', 'tblTempUsageDetail_20' ) start [2025-03-03 22:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601609', 'tblTempUsageDetail_20' ) end [2025-03-03 22:46:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:46:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:46:21] Production.INFO: ==5202== Releasing lock... [2025-03-03 22:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:46:21] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 22:47:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:47:05 [end_date_ymd] => 2025-03-03 22:47:05 [RateCDR] => 1 ) [2025-03-03 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-03 19:47:05' and `end` < '2025-03-03 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-03 22:47:17] Production.INFO: count ==745 [2025-03-03 22:47:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:47:05 - End Time 2025-03-03 22:47:05 [2025-03-03 22:47:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601614', 'tblTempUsageDetail_20' ) start [2025-03-03 22:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601614', 'tblTempUsageDetail_20' ) end [2025-03-03 22:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601614', 'tblTempVendorCDR_20' ) start [2025-03-03 22:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601614', 'tblTempVendorCDR_20' ) end [2025-03-03 22:47:18] Production.INFO: ProcessCDR(1,14601614,1,1,2) [2025-03-03 22:47:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601614,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:47:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601614,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:47:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601614,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:47:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601614,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:47:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601614', 'tblTempUsageDetail_20' ) start [2025-03-03 22:47:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601614', 'tblTempUsageDetail_20' ) end [2025-03-03 22:47:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:47:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:47:21] Production.INFO: ==5277== Releasing lock... [2025-03-03 22:47:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:47:21] Production.INFO: 33 MB #Memory Used# [2025-03-03 22:48:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:48:06 [end_date_ymd] => 2025-03-03 22:48:06 [RateCDR] => 1 ) [2025-03-03 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-03 19:48:06' and `end` < '2025-03-03 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-03 22:48:18] Production.INFO: count ==745 [2025-03-03 22:48:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:48:06 - End Time 2025-03-03 22:48:06 [2025-03-03 22:48:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601619', 'tblTempUsageDetail_20' ) start [2025-03-03 22:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601619', 'tblTempUsageDetail_20' ) end [2025-03-03 22:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601619', 'tblTempVendorCDR_20' ) start [2025-03-03 22:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601619', 'tblTempVendorCDR_20' ) end [2025-03-03 22:48:18] Production.INFO: ProcessCDR(1,14601619,1,1,2) [2025-03-03 22:48:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601619,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:48:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601619,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:48:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601619,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:48:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601619,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:48:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601619', 'tblTempUsageDetail_20' ) start [2025-03-03 22:48:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601619', 'tblTempUsageDetail_20' ) end [2025-03-03 22:48:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:48:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:48:21] Production.INFO: ==5355== Releasing lock... [2025-03-03 22:48:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:48:21] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 22:49:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:49:05 [end_date_ymd] => 2025-03-03 22:49:05 [RateCDR] => 1 ) [2025-03-03 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-03 19:49:05' and `end` < '2025-03-03 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-03 22:49:17] Production.INFO: count ==737 [2025-03-03 22:49:17] Production.ERROR: pbx CDR StartTime 2025-03-03 19:49:05 - End Time 2025-03-03 22:49:05 [2025-03-03 22:49:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601624', 'tblTempUsageDetail_20' ) start [2025-03-03 22:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601624', 'tblTempUsageDetail_20' ) end [2025-03-03 22:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601624', 'tblTempVendorCDR_20' ) start [2025-03-03 22:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601624', 'tblTempVendorCDR_20' ) end [2025-03-03 22:49:17] Production.INFO: ProcessCDR(1,14601624,1,1,2) [2025-03-03 22:49:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601624,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:49:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601624,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:49:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601624,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:49:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601624,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:49:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601624', 'tblTempUsageDetail_20' ) start [2025-03-03 22:49:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601624', 'tblTempUsageDetail_20' ) end [2025-03-03 22:49:20] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:49:20] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:49:21] Production.INFO: ==5433== Releasing lock... [2025-03-03 22:49:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:49:21] Production.INFO: 33.25 MB #Memory Used# [2025-03-03 22:50:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:50:06 [end_date_ymd] => 2025-03-03 22:50:06 [RateCDR] => 1 ) [2025-03-03 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-03 19:50:06' and `end` < '2025-03-03 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-03 22:50:18] Production.INFO: count ==732 [2025-03-03 22:50:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:50:06 - End Time 2025-03-03 22:50:06 [2025-03-03 22:50:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601630', 'tblTempUsageDetail_20' ) start [2025-03-03 22:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601630', 'tblTempUsageDetail_20' ) end [2025-03-03 22:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601630', 'tblTempVendorCDR_20' ) start [2025-03-03 22:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601630', 'tblTempVendorCDR_20' ) end [2025-03-03 22:50:18] Production.INFO: ProcessCDR(1,14601630,1,1,2) [2025-03-03 22:50:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601630,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:50:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601630,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:50:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601630,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:50:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601630,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:50:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601630', 'tblTempUsageDetail_20' ) start [2025-03-03 22:50:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601630', 'tblTempUsageDetail_20' ) end [2025-03-03 22:50:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:50:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:50:22] Production.INFO: ==5510== Releasing lock... [2025-03-03 22:50:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:50:22] Production.INFO: 33 MB #Memory Used# [2025-03-03 22:51:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:51:05 [end_date_ymd] => 2025-03-03 22:51:05 [RateCDR] => 1 ) [2025-03-03 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-03 19:51:05' and `end` < '2025-03-03 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-03 22:51:17] Production.INFO: count ==722 [2025-03-03 22:51:17] Production.ERROR: pbx CDR StartTime 2025-03-03 19:51:05 - End Time 2025-03-03 22:51:05 [2025-03-03 22:51:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601635', 'tblTempUsageDetail_20' ) start [2025-03-03 22:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601635', 'tblTempUsageDetail_20' ) end [2025-03-03 22:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601635', 'tblTempVendorCDR_20' ) start [2025-03-03 22:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601635', 'tblTempVendorCDR_20' ) end [2025-03-03 22:51:17] Production.INFO: ProcessCDR(1,14601635,1,1,2) [2025-03-03 22:51:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601635,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:51:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601635,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:51:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601635,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:51:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601635,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:51:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601635', 'tblTempUsageDetail_20' ) start [2025-03-03 22:51:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601635', 'tblTempUsageDetail_20' ) end [2025-03-03 22:51:20] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:51:20] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:51:20] Production.INFO: ==5586== Releasing lock... [2025-03-03 22:51:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:51:20] Production.INFO: 32.75 MB #Memory Used# [2025-03-03 22:52:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:52:06 [end_date_ymd] => 2025-03-03 22:52:06 [RateCDR] => 1 ) [2025-03-03 22:52:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 19:52:06' and `end` < '2025-03-03 22:52:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 22:52:17] Production.INFO: count ==726 [2025-03-03 22:52:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:52:06 - End Time 2025-03-03 22:52:06 [2025-03-03 22:52:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601640', 'tblTempUsageDetail_20' ) start [2025-03-03 22:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601640', 'tblTempUsageDetail_20' ) end [2025-03-03 22:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601640', 'tblTempVendorCDR_20' ) start [2025-03-03 22:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601640', 'tblTempVendorCDR_20' ) end [2025-03-03 22:52:18] Production.INFO: ProcessCDR(1,14601640,1,1,2) [2025-03-03 22:52:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601640,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:52:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601640,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:52:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601640,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:52:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601640,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:52:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601640', 'tblTempUsageDetail_20' ) start [2025-03-03 22:52:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601640', 'tblTempUsageDetail_20' ) end [2025-03-03 22:52:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:52:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:52:21] Production.INFO: ==5664== Releasing lock... [2025-03-03 22:52:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:52:21] Production.INFO: 33 MB #Memory Used# [2025-03-03 22:53:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:53:04 [end_date_ymd] => 2025-03-03 22:53:04 [RateCDR] => 1 ) [2025-03-03 22:53:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 19:53:04' and `end` < '2025-03-03 22: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-03 22:53:16] Production.INFO: count ==726 [2025-03-03 22:53:16] Production.ERROR: pbx CDR StartTime 2025-03-03 19:53:04 - End Time 2025-03-03 22:53:04 [2025-03-03 22:53:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601645', 'tblTempUsageDetail_20' ) start [2025-03-03 22:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601645', 'tblTempUsageDetail_20' ) end [2025-03-03 22:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601645', 'tblTempVendorCDR_20' ) start [2025-03-03 22:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601645', 'tblTempVendorCDR_20' ) end [2025-03-03 22:53:16] Production.INFO: ProcessCDR(1,14601645,1,1,2) [2025-03-03 22:53:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601645,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:53:17] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601645,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:53:17] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601645,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:53:19] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601645,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:53:19] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601645', 'tblTempUsageDetail_20' ) start [2025-03-03 22:53:19] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601645', 'tblTempUsageDetail_20' ) end [2025-03-03 22:53:19] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:53:19] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:53:19] Production.INFO: ==5739== Releasing lock... [2025-03-03 22:53:19] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:53:19] Production.INFO: 33 MB #Memory Used# [2025-03-03 22:54:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:54:05 [end_date_ymd] => 2025-03-03 22:54:05 [RateCDR] => 1 ) [2025-03-03 22: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-03 19:54:05' and `end` < '2025-03-03 22: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-03 22:54:17] Production.INFO: count ==726 [2025-03-03 22:54:17] Production.ERROR: pbx CDR StartTime 2025-03-03 19:54:05 - End Time 2025-03-03 22:54:05 [2025-03-03 22:54:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601650', 'tblTempUsageDetail_20' ) start [2025-03-03 22:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601650', 'tblTempUsageDetail_20' ) end [2025-03-03 22:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601650', 'tblTempVendorCDR_20' ) start [2025-03-03 22:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601650', 'tblTempVendorCDR_20' ) end [2025-03-03 22:54:17] Production.INFO: ProcessCDR(1,14601650,1,1,2) [2025-03-03 22:54:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601650,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:54:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601650,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:54:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601650,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:54:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601650,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:54:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601650', 'tblTempUsageDetail_20' ) start [2025-03-03 22:54:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601650', 'tblTempUsageDetail_20' ) end [2025-03-03 22:54:20] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:54:20] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:54:20] Production.INFO: ==5816== Releasing lock... [2025-03-03 22:54:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:54:20] Production.INFO: 33 MB #Memory Used# [2025-03-03 22:55:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:55:05 [end_date_ymd] => 2025-03-03 22:55:05 [RateCDR] => 1 ) [2025-03-03 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-03 19:55:05' and `end` < '2025-03-03 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-03 22:55:17] Production.INFO: count ==723 [2025-03-03 22:55:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:55:05 - End Time 2025-03-03 22:55:05 [2025-03-03 22:55:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601655', 'tblTempUsageDetail_20' ) start [2025-03-03 22:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601655', 'tblTempUsageDetail_20' ) end [2025-03-03 22:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601655', 'tblTempVendorCDR_20' ) start [2025-03-03 22:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601655', 'tblTempVendorCDR_20' ) end [2025-03-03 22:55:18] Production.INFO: ProcessCDR(1,14601655,1,1,2) [2025-03-03 22:55:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601655,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:55:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601655,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:55:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601655,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:55:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601655,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601655', 'tblTempUsageDetail_20' ) start [2025-03-03 22:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601655', 'tblTempUsageDetail_20' ) end [2025-03-03 22:55:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:55:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:55:21] Production.INFO: ==5894== Releasing lock... [2025-03-03 22:55:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:55:21] Production.INFO: 33 MB #Memory Used# [2025-03-03 22:56:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:56:05 [end_date_ymd] => 2025-03-03 22:56:05 [RateCDR] => 1 ) [2025-03-03 22: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-03 19:56:05' and `end` < '2025-03-03 22: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-03 22:56:17] Production.INFO: count ==723 [2025-03-03 22:56:17] Production.ERROR: pbx CDR StartTime 2025-03-03 19:56:05 - End Time 2025-03-03 22:56:05 [2025-03-03 22:56:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601660', 'tblTempUsageDetail_20' ) start [2025-03-03 22:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601660', 'tblTempUsageDetail_20' ) end [2025-03-03 22:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601660', 'tblTempVendorCDR_20' ) start [2025-03-03 22:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601660', 'tblTempVendorCDR_20' ) end [2025-03-03 22:56:17] Production.INFO: ProcessCDR(1,14601660,1,1,2) [2025-03-03 22:56:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601660,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:56:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601660,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:56:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601660,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:56:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601660,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:56:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601660', 'tblTempUsageDetail_20' ) start [2025-03-03 22:56:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601660', 'tblTempUsageDetail_20' ) end [2025-03-03 22:56:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:56:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:56:21] Production.INFO: ==5969== Releasing lock... [2025-03-03 22:56:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:56:21] Production.INFO: 33 MB #Memory Used# [2025-03-03 22:57:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:57:05 [end_date_ymd] => 2025-03-03 22:57:05 [RateCDR] => 1 ) [2025-03-03 22:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 19:57:05' and `end` < '2025-03-03 22:57:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 22:57:18] Production.INFO: count ==724 [2025-03-03 22:57:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:57:05 - End Time 2025-03-03 22:57:05 [2025-03-03 22:57:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601665', 'tblTempUsageDetail_20' ) start [2025-03-03 22:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601665', 'tblTempUsageDetail_20' ) end [2025-03-03 22:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601665', 'tblTempVendorCDR_20' ) start [2025-03-03 22:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601665', 'tblTempVendorCDR_20' ) end [2025-03-03 22:57:18] Production.INFO: ProcessCDR(1,14601665,1,1,2) [2025-03-03 22:57:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601665,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:57:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601665,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:57:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601665,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:57:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601665,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:57:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601665', 'tblTempUsageDetail_20' ) start [2025-03-03 22:57:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601665', 'tblTempUsageDetail_20' ) end [2025-03-03 22:57:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:57:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:57:23] Production.INFO: ==6043== Releasing lock... [2025-03-03 22:57:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:57:23] Production.INFO: 32.75 MB #Memory Used# [2025-03-03 22:58:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:58:05 [end_date_ymd] => 2025-03-03 22:58:05 [RateCDR] => 1 ) [2025-03-03 22: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-03 19:58:05' and `end` < '2025-03-03 22: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-03 22:58:17] Production.INFO: count ==717 [2025-03-03 22:58:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:58:05 - End Time 2025-03-03 22:58:05 [2025-03-03 22:58:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601670', 'tblTempUsageDetail_20' ) start [2025-03-03 22:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601670', 'tblTempUsageDetail_20' ) end [2025-03-03 22:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601670', 'tblTempVendorCDR_20' ) start [2025-03-03 22:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601670', 'tblTempVendorCDR_20' ) end [2025-03-03 22:58:18] Production.INFO: ProcessCDR(1,14601670,1,1,2) [2025-03-03 22:58:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601670,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:58:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601670,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:58:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601670,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:58:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601670,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:58:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601670', 'tblTempUsageDetail_20' ) start [2025-03-03 22:58:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601670', 'tblTempUsageDetail_20' ) end [2025-03-03 22:58:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:58:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:58:21] Production.INFO: ==6116== Releasing lock... [2025-03-03 22:58:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:58:21] Production.INFO: 33 MB #Memory Used# [2025-03-03 22:59:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 19:59:06 [end_date_ymd] => 2025-03-03 22:59:06 [RateCDR] => 1 ) [2025-03-03 22: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-03 19:59:06' and `end` < '2025-03-03 22: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-03 22:59:18] Production.INFO: count ==717 [2025-03-03 22:59:18] Production.ERROR: pbx CDR StartTime 2025-03-03 19:59:06 - End Time 2025-03-03 22:59:06 [2025-03-03 22:59:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 22:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601675', 'tblTempUsageDetail_20' ) start [2025-03-03 22:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601675', 'tblTempUsageDetail_20' ) end [2025-03-03 22:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601675', 'tblTempVendorCDR_20' ) start [2025-03-03 22:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601675', 'tblTempVendorCDR_20' ) end [2025-03-03 22:59:18] Production.INFO: ProcessCDR(1,14601675,1,1,2) [2025-03-03 22:59:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601675,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:59:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601675,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 22:59:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601675,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:59:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601675,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 22:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601675', 'tblTempUsageDetail_20' ) start [2025-03-03 22:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601675', 'tblTempUsageDetail_20' ) end [2025-03-03 22:59:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 22:59:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 22:59:21] Production.INFO: ==6190== Releasing lock... [2025-03-03 22:59:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 22:59:21] Production.INFO: 33 MB #Memory Used# [2025-03-03 23:00:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:00:06 [end_date_ymd] => 2025-03-03 23:00:06 [RateCDR] => 1 ) [2025-03-03 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-03 20:00:06' and `end` < '2025-03-03 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-03 23:00:18] Production.INFO: count ==716 [2025-03-03 23:00:18] Production.ERROR: pbx CDR StartTime 2025-03-03 20:00:06 - End Time 2025-03-03 23:00:06 [2025-03-03 23:00:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601680', 'tblTempUsageDetail_20' ) start [2025-03-03 23:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601680', 'tblTempUsageDetail_20' ) end [2025-03-03 23:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601680', 'tblTempVendorCDR_20' ) start [2025-03-03 23:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601680', 'tblTempVendorCDR_20' ) end [2025-03-03 23:00:18] Production.INFO: ProcessCDR(1,14601680,1,1,2) [2025-03-03 23:00:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601680,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:00:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601680,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:00:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601680,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:00:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601680,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:00:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601680', 'tblTempUsageDetail_20' ) start [2025-03-03 23:00:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601680', 'tblTempUsageDetail_20' ) end [2025-03-03 23:00:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:00:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:00:21] Production.INFO: ==6272== Releasing lock... [2025-03-03 23:00:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:00:21] Production.INFO: 32.75 MB #Memory Used# [2025-03-03 23:01:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:01:05 [end_date_ymd] => 2025-03-03 23:01:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:01:05' and `end` < '2025-03-03 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-03 23:01:17] Production.INFO: count ==714 [2025-03-03 23:01:18] Production.ERROR: pbx CDR StartTime 2025-03-03 20:01:05 - End Time 2025-03-03 23:01:05 [2025-03-03 23:01:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601686', 'tblTempUsageDetail_20' ) start [2025-03-03 23:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601686', 'tblTempUsageDetail_20' ) end [2025-03-03 23:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601686', 'tblTempVendorCDR_20' ) start [2025-03-03 23:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601686', 'tblTempVendorCDR_20' ) end [2025-03-03 23:01:18] Production.INFO: ProcessCDR(1,14601686,1,1,2) [2025-03-03 23:01:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601686,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:01:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601686,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:01:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601686,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:01:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601686,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601686', 'tblTempUsageDetail_20' ) start [2025-03-03 23:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601686', 'tblTempUsageDetail_20' ) end [2025-03-03 23:01:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:01:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:01:21] Production.INFO: ==6397== Releasing lock... [2025-03-03 23:01:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:01:21] Production.INFO: 33 MB #Memory Used# [2025-03-03 23:02:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:02:05 [end_date_ymd] => 2025-03-03 23:02:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:02:05' and `end` < '2025-03-03 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-03 23:02:17] Production.INFO: count ==713 [2025-03-03 23:02:18] Production.ERROR: pbx CDR StartTime 2025-03-03 20:02:05 - End Time 2025-03-03 23:02:05 [2025-03-03 23:02:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601691', 'tblTempUsageDetail_20' ) start [2025-03-03 23:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601691', 'tblTempUsageDetail_20' ) end [2025-03-03 23:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601691', 'tblTempVendorCDR_20' ) start [2025-03-03 23:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601691', 'tblTempVendorCDR_20' ) end [2025-03-03 23:02:18] Production.INFO: ProcessCDR(1,14601691,1,1,2) [2025-03-03 23:02:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601691,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:02:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601691,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:02:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601691,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:02:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601691,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:02:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601691', 'tblTempUsageDetail_20' ) start [2025-03-03 23:02:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601691', 'tblTempUsageDetail_20' ) end [2025-03-03 23:02:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:02:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:02:21] Production.INFO: ==6547== Releasing lock... [2025-03-03 23:02:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:02:21] Production.INFO: 33 MB #Memory Used# [2025-03-03 23:03:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:03:05 [end_date_ymd] => 2025-03-03 23:03:05 [RateCDR] => 1 ) [2025-03-03 23:03:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 20:03:05' and `end` < '2025-03-03 23:03:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 23:03:17] Production.INFO: count ==709 [2025-03-03 23:03:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:03:05 - End Time 2025-03-03 23:03:05 [2025-03-03 23:03:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601696', 'tblTempUsageDetail_20' ) start [2025-03-03 23:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601696', 'tblTempUsageDetail_20' ) end [2025-03-03 23:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601696', 'tblTempVendorCDR_20' ) start [2025-03-03 23:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601696', 'tblTempVendorCDR_20' ) end [2025-03-03 23:03:17] Production.INFO: ProcessCDR(1,14601696,1,1,2) [2025-03-03 23:03:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601696,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:03:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601696,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:03:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601696,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:03:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601696,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:03:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601696', 'tblTempUsageDetail_20' ) start [2025-03-03 23:03:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601696', 'tblTempUsageDetail_20' ) end [2025-03-03 23:03:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:03:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:03:21] Production.INFO: ==6618== Releasing lock... [2025-03-03 23:03:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:03:21] Production.INFO: 32.75 MB #Memory Used# [2025-03-03 23:04:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:04:05 [end_date_ymd] => 2025-03-03 23:04:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:04:05' and `end` < '2025-03-03 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-03 23:04:17] Production.INFO: count ==708 [2025-03-03 23:04:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:04:05 - End Time 2025-03-03 23:04:05 [2025-03-03 23:04:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601701', 'tblTempUsageDetail_20' ) start [2025-03-03 23:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601701', 'tblTempUsageDetail_20' ) end [2025-03-03 23:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601701', 'tblTempVendorCDR_20' ) start [2025-03-03 23:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601701', 'tblTempVendorCDR_20' ) end [2025-03-03 23:04:17] Production.INFO: ProcessCDR(1,14601701,1,1,2) [2025-03-03 23:04:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601701,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:04:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601701,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:04:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601701,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:04:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601701,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:04:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601701', 'tblTempUsageDetail_20' ) start [2025-03-03 23:04:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601701', 'tblTempUsageDetail_20' ) end [2025-03-03 23:04:20] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:04:20] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:04:20] Production.INFO: ==6689== Releasing lock... [2025-03-03 23:04:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:04:20] Production.INFO: 32.75 MB #Memory Used# [2025-03-03 23:05:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:05:05 [end_date_ymd] => 2025-03-03 23:05:05 [RateCDR] => 1 ) [2025-03-03 23:05:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 20:05:05' and `end` < '2025-03-03 23: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-03 23:05:17] Production.INFO: count ==701 [2025-03-03 23:05:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:05:05 - End Time 2025-03-03 23:05:05 [2025-03-03 23:05:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601706', 'tblTempUsageDetail_20' ) start [2025-03-03 23:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601706', 'tblTempUsageDetail_20' ) end [2025-03-03 23:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601706', 'tblTempVendorCDR_20' ) start [2025-03-03 23:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601706', 'tblTempVendorCDR_20' ) end [2025-03-03 23:05:18] Production.INFO: ProcessCDR(1,14601706,1,1,2) [2025-03-03 23:05:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601706,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:05:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601706,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:05:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601706,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:05:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601706,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:05:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601706', 'tblTempUsageDetail_20' ) start [2025-03-03 23:05:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601706', 'tblTempUsageDetail_20' ) end [2025-03-03 23:05:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:05:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:05:21] Production.INFO: ==6837== Releasing lock... [2025-03-03 23:05:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:05:21] Production.INFO: 32.75 MB #Memory Used# [2025-03-03 23:06:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:06:04 [end_date_ymd] => 2025-03-03 23:06:04 [RateCDR] => 1 ) [2025-03-03 23:06:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 20:06:04' and `end` < '2025-03-03 23:06:04' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 23:06:17] Production.INFO: count ==702 [2025-03-03 23:06:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:06:04 - End Time 2025-03-03 23:06:04 [2025-03-03 23:06:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601711', 'tblTempUsageDetail_20' ) start [2025-03-03 23:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601711', 'tblTempUsageDetail_20' ) end [2025-03-03 23:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601711', 'tblTempVendorCDR_20' ) start [2025-03-03 23:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601711', 'tblTempVendorCDR_20' ) end [2025-03-03 23:06:17] Production.INFO: ProcessCDR(1,14601711,1,1,2) [2025-03-03 23:06:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601711,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:06:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601711,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:06:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601711,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:06:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601711,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:06:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601711', 'tblTempUsageDetail_20' ) start [2025-03-03 23:06:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601711', 'tblTempUsageDetail_20' ) end [2025-03-03 23:06:20] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:06:20] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:06:20] Production.INFO: ==6906== Releasing lock... [2025-03-03 23:06:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:06:20] Production.INFO: 32.75 MB #Memory Used# [2025-03-03 23:07:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:07:06 [end_date_ymd] => 2025-03-03 23:07:06 [RateCDR] => 1 ) [2025-03-03 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-03 20:07:06' and `end` < '2025-03-03 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-03 23:07:18] Production.INFO: count ==702 [2025-03-03 23:07:18] Production.ERROR: pbx CDR StartTime 2025-03-03 20:07:06 - End Time 2025-03-03 23:07:06 [2025-03-03 23:07:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601716', 'tblTempUsageDetail_20' ) start [2025-03-03 23:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601716', 'tblTempUsageDetail_20' ) end [2025-03-03 23:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601716', 'tblTempVendorCDR_20' ) start [2025-03-03 23:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601716', 'tblTempVendorCDR_20' ) end [2025-03-03 23:07:18] Production.INFO: ProcessCDR(1,14601716,1,1,2) [2025-03-03 23:07:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601716,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:07:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601716,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:07:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601716,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:07:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601716,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:07:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601716', 'tblTempUsageDetail_20' ) start [2025-03-03 23:07:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601716', 'tblTempUsageDetail_20' ) end [2025-03-03 23:07:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:07:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:07:23] Production.INFO: ==6978== Releasing lock... [2025-03-03 23:07:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:07:23] Production.INFO: 32.75 MB #Memory Used# [2025-03-03 23:08:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:08:05 [end_date_ymd] => 2025-03-03 23:08:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:08:05' and `end` < '2025-03-03 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-03 23:08:17] Production.INFO: count ==704 [2025-03-03 23:08:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:08:05 - End Time 2025-03-03 23:08:05 [2025-03-03 23:08:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601721', 'tblTempUsageDetail_20' ) start [2025-03-03 23:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601721', 'tblTempUsageDetail_20' ) end [2025-03-03 23:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601721', 'tblTempVendorCDR_20' ) start [2025-03-03 23:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601721', 'tblTempVendorCDR_20' ) end [2025-03-03 23:08:17] Production.INFO: ProcessCDR(1,14601721,1,1,2) [2025-03-03 23:08:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601721,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:08:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601721,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:08:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601721,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:08:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601721,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:08:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601721', 'tblTempUsageDetail_20' ) start [2025-03-03 23:08:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601721', 'tblTempUsageDetail_20' ) end [2025-03-03 23:08:20] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:08:20] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:08:20] Production.INFO: ==7094== Releasing lock... [2025-03-03 23:08:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:08:20] Production.INFO: 32.75 MB #Memory Used# [2025-03-03 23:09:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:09:05 [end_date_ymd] => 2025-03-03 23:09:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:09:05' and `end` < '2025-03-03 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-03 23:09:17] Production.INFO: count ==699 [2025-03-03 23:09:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:09:05 - End Time 2025-03-03 23:09:05 [2025-03-03 23:09:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601726', 'tblTempUsageDetail_20' ) start [2025-03-03 23:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601726', 'tblTempUsageDetail_20' ) end [2025-03-03 23:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601726', 'tblTempVendorCDR_20' ) start [2025-03-03 23:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601726', 'tblTempVendorCDR_20' ) end [2025-03-03 23:09:18] Production.INFO: ProcessCDR(1,14601726,1,1,2) [2025-03-03 23:09:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601726,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:09:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601726,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:09:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601726,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:09:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601726,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:09:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601726', 'tblTempUsageDetail_20' ) start [2025-03-03 23:09:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601726', 'tblTempUsageDetail_20' ) end [2025-03-03 23:09:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:09:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:09:21] Production.INFO: ==7206== Releasing lock... [2025-03-03 23:09:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:09:21] Production.INFO: 32.75 MB #Memory Used# [2025-03-03 23:10:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:10:06 [end_date_ymd] => 2025-03-03 23:10:06 [RateCDR] => 1 ) [2025-03-03 23:10:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 20:10:06' and `end` < '2025-03-03 23:10:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 23:10:18] Production.INFO: count ==701 [2025-03-03 23:10:18] Production.ERROR: pbx CDR StartTime 2025-03-03 20:10:06 - End Time 2025-03-03 23:10:06 [2025-03-03 23:10:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601732', 'tblTempUsageDetail_20' ) start [2025-03-03 23:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601732', 'tblTempUsageDetail_20' ) end [2025-03-03 23:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601732', 'tblTempVendorCDR_20' ) start [2025-03-03 23:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601732', 'tblTempVendorCDR_20' ) end [2025-03-03 23:10:18] Production.INFO: ProcessCDR(1,14601732,1,1,2) [2025-03-03 23:10:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601732,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:10:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601732,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:10:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601732,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:10:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601732,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:10:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601732', 'tblTempUsageDetail_20' ) start [2025-03-03 23:10:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601732', 'tblTempUsageDetail_20' ) end [2025-03-03 23:10:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:10:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:10:22] Production.INFO: ==7281== Releasing lock... [2025-03-03 23:10:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:10:22] Production.INFO: 32.75 MB #Memory Used# [2025-03-03 23:11:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:11:05 [end_date_ymd] => 2025-03-03 23:11:05 [RateCDR] => 1 ) [2025-03-03 23:11:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 20:11:05' and `end` < '2025-03-03 23:11:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 23:11:17] Production.INFO: count ==675 [2025-03-03 23:11:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:11:05 - End Time 2025-03-03 23:11:05 [2025-03-03 23:11:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601737', 'tblTempUsageDetail_20' ) start [2025-03-03 23:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601737', 'tblTempUsageDetail_20' ) end [2025-03-03 23:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601737', 'tblTempVendorCDR_20' ) start [2025-03-03 23:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601737', 'tblTempVendorCDR_20' ) end [2025-03-03 23:11:17] Production.INFO: ProcessCDR(1,14601737,1,1,2) [2025-03-03 23:11:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601737,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:11:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601737,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:11:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601737,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:11:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601737,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:11:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601737', 'tblTempUsageDetail_20' ) start [2025-03-03 23:11:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601737', 'tblTempUsageDetail_20' ) end [2025-03-03 23:11:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:11:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:11:21] Production.INFO: ==7359== Releasing lock... [2025-03-03 23:11:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:11:21] Production.INFO: 32.5 MB #Memory Used# [2025-03-03 23:12:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:12:06 [end_date_ymd] => 2025-03-03 23:12:06 [RateCDR] => 1 ) [2025-03-03 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-03 20:12:06' and `end` < '2025-03-03 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-03 23:12:18] Production.INFO: count ==673 [2025-03-03 23:12:18] Production.ERROR: pbx CDR StartTime 2025-03-03 20:12:06 - End Time 2025-03-03 23:12:06 [2025-03-03 23:12:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601742', 'tblTempUsageDetail_20' ) start [2025-03-03 23:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601742', 'tblTempUsageDetail_20' ) end [2025-03-03 23:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601742', 'tblTempVendorCDR_20' ) start [2025-03-03 23:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601742', 'tblTempVendorCDR_20' ) end [2025-03-03 23:12:18] Production.INFO: ProcessCDR(1,14601742,1,1,2) [2025-03-03 23:12:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601742,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:12:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601742,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:12:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601742,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:12:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601742,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:12:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601742', 'tblTempUsageDetail_20' ) start [2025-03-03 23:12:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601742', 'tblTempUsageDetail_20' ) end [2025-03-03 23:12:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:12:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:12:22] Production.INFO: ==7509== Releasing lock... [2025-03-03 23:12:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:12:22] Production.INFO: 32.5 MB #Memory Used# [2025-03-03 23:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:13:05 [end_date_ymd] => 2025-03-03 23:13:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:13:05' and `end` < '2025-03-03 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-03 23:13:17] Production.INFO: count ==670 [2025-03-03 23:13:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:13:05 - End Time 2025-03-03 23:13:05 [2025-03-03 23:13:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601747', 'tblTempUsageDetail_20' ) start [2025-03-03 23:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601747', 'tblTempUsageDetail_20' ) end [2025-03-03 23:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601747', 'tblTempVendorCDR_20' ) start [2025-03-03 23:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601747', 'tblTempVendorCDR_20' ) end [2025-03-03 23:13:17] Production.INFO: ProcessCDR(1,14601747,1,1,2) [2025-03-03 23:13:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601747,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:13:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601747,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:13:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601747,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:13:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601747,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:13:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601747', 'tblTempUsageDetail_20' ) start [2025-03-03 23:13:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601747', 'tblTempUsageDetail_20' ) end [2025-03-03 23:13:20] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:13:20] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:13:20] Production.INFO: ==7579== Releasing lock... [2025-03-03 23:13:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:13:20] Production.INFO: 32.5 MB #Memory Used# [2025-03-03 23:14:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:14:05 [end_date_ymd] => 2025-03-03 23:14:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:14:05' and `end` < '2025-03-03 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-03 23:14:17] Production.INFO: count ==674 [2025-03-03 23:14:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:14:05 - End Time 2025-03-03 23:14:05 [2025-03-03 23:14:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601752', 'tblTempUsageDetail_20' ) start [2025-03-03 23:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601752', 'tblTempUsageDetail_20' ) end [2025-03-03 23:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601752', 'tblTempVendorCDR_20' ) start [2025-03-03 23:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601752', 'tblTempVendorCDR_20' ) end [2025-03-03 23:14:17] Production.INFO: ProcessCDR(1,14601752,1,1,2) [2025-03-03 23:14:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601752,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:14:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601752,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:14:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601752,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:14:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601752,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:14:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601752', 'tblTempUsageDetail_20' ) start [2025-03-03 23:14:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601752', 'tblTempUsageDetail_20' ) end [2025-03-03 23:14:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:14:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:14:21] Production.INFO: ==7652== Releasing lock... [2025-03-03 23:14:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:14:21] Production.INFO: 32.5 MB #Memory Used# [2025-03-03 23:15:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:15:05 [end_date_ymd] => 2025-03-03 23:15:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:15:05' and `end` < '2025-03-03 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-03 23:15:17] Production.INFO: count ==673 [2025-03-03 23:15:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:15:05 - End Time 2025-03-03 23:15:05 [2025-03-03 23:15:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601757', 'tblTempUsageDetail_20' ) start [2025-03-03 23:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601757', 'tblTempUsageDetail_20' ) end [2025-03-03 23:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601757', 'tblTempVendorCDR_20' ) start [2025-03-03 23:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601757', 'tblTempVendorCDR_20' ) end [2025-03-03 23:15:17] Production.INFO: ProcessCDR(1,14601757,1,1,2) [2025-03-03 23:15:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601757,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:15:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601757,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:15:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601757,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:15:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601757,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:15:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601757', 'tblTempUsageDetail_20' ) start [2025-03-03 23:15:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601757', 'tblTempUsageDetail_20' ) end [2025-03-03 23:15:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:15:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:15:21] Production.INFO: ==7805== Releasing lock... [2025-03-03 23:15:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:15:21] Production.INFO: 32.5 MB #Memory Used# [2025-03-03 23:16:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:16:05 [end_date_ymd] => 2025-03-03 23:16:05 [RateCDR] => 1 ) [2025-03-03 23:16:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 20:16:05' and `end` < '2025-03-03 23:16:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 23:16:17] Production.INFO: count ==670 [2025-03-03 23:16:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:16:05 - End Time 2025-03-03 23:16:05 [2025-03-03 23:16:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601762', 'tblTempUsageDetail_20' ) start [2025-03-03 23:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601762', 'tblTempUsageDetail_20' ) end [2025-03-03 23:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601762', 'tblTempVendorCDR_20' ) start [2025-03-03 23:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601762', 'tblTempVendorCDR_20' ) end [2025-03-03 23:16:17] Production.INFO: ProcessCDR(1,14601762,1,1,2) [2025-03-03 23:16:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601762,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:16:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601762,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:16:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601762,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:16:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601762,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:16:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601762', 'tblTempUsageDetail_20' ) start [2025-03-03 23:16:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601762', 'tblTempUsageDetail_20' ) end [2025-03-03 23:16:20] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:16:20] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:16:20] Production.INFO: ==7915== Releasing lock... [2025-03-03 23:16:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:16:20] Production.INFO: 32.75 MB #Memory Used# [2025-03-03 23:17:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:17:05 [end_date_ymd] => 2025-03-03 23:17:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:17:05' and `end` < '2025-03-03 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-03 23:17:18] Production.INFO: count ==665 [2025-03-03 23:17:18] Production.ERROR: pbx CDR StartTime 2025-03-03 20:17:05 - End Time 2025-03-03 23:17:05 [2025-03-03 23:17:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601767', 'tblTempUsageDetail_20' ) start [2025-03-03 23:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601767', 'tblTempUsageDetail_20' ) end [2025-03-03 23:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601767', 'tblTempVendorCDR_20' ) start [2025-03-03 23:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601767', 'tblTempVendorCDR_20' ) end [2025-03-03 23:17:18] Production.INFO: ProcessCDR(1,14601767,1,1,2) [2025-03-03 23:17:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601767,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:17:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601767,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:17:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601767,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:17:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601767,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601767', 'tblTempUsageDetail_20' ) start [2025-03-03 23:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601767', 'tblTempUsageDetail_20' ) end [2025-03-03 23:17:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:17:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:17:21] Production.INFO: ==7990== Releasing lock... [2025-03-03 23:17:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:17:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-03 23:18:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:18:05 [end_date_ymd] => 2025-03-03 23:18:05 [RateCDR] => 1 ) [2025-03-03 23:18:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 20:18:05' and `end` < '2025-03-03 23:18:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 23:18:18] Production.INFO: count ==665 [2025-03-03 23:18:18] Production.ERROR: pbx CDR StartTime 2025-03-03 20:18:05 - End Time 2025-03-03 23:18:05 [2025-03-03 23:18:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601772', 'tblTempUsageDetail_20' ) start [2025-03-03 23:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601772', 'tblTempUsageDetail_20' ) end [2025-03-03 23:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601772', 'tblTempVendorCDR_20' ) start [2025-03-03 23:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601772', 'tblTempVendorCDR_20' ) end [2025-03-03 23:18:18] Production.INFO: ProcessCDR(1,14601772,1,1,2) [2025-03-03 23:18:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601772,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:18:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601772,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:18:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601772,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:18:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601772,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601772', 'tblTempUsageDetail_20' ) start [2025-03-03 23:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601772', 'tblTempUsageDetail_20' ) end [2025-03-03 23:18:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:18:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:18:21] Production.INFO: ==8069== Releasing lock... [2025-03-03 23:18:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:18:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-03 23:19:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:19:06 [end_date_ymd] => 2025-03-03 23:19:06 [RateCDR] => 1 ) [2025-03-03 23: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-03 20:19:06' and `end` < '2025-03-03 23: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-03 23:19:18] Production.INFO: count ==662 [2025-03-03 23:19:18] Production.ERROR: pbx CDR StartTime 2025-03-03 20:19:06 - End Time 2025-03-03 23:19:06 [2025-03-03 23:19:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601777', 'tblTempUsageDetail_20' ) start [2025-03-03 23:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601777', 'tblTempUsageDetail_20' ) end [2025-03-03 23:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601777', 'tblTempVendorCDR_20' ) start [2025-03-03 23:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601777', 'tblTempVendorCDR_20' ) end [2025-03-03 23:19:18] Production.INFO: ProcessCDR(1,14601777,1,1,2) [2025-03-03 23:19:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601777,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:19:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601777,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:19:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601777,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:19:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601777,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:19:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601777', 'tblTempUsageDetail_20' ) start [2025-03-03 23:19:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601777', 'tblTempUsageDetail_20' ) end [2025-03-03 23:19:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:19:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:19:21] Production.INFO: ==8152== Releasing lock... [2025-03-03 23:19:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:19:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-03 23:20:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:20:06 [end_date_ymd] => 2025-03-03 23:20:06 [RateCDR] => 1 ) [2025-03-03 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-03 20:20:06' and `end` < '2025-03-03 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-03 23:20:18] Production.INFO: count ==659 [2025-03-03 23:20:18] Production.ERROR: pbx CDR StartTime 2025-03-03 20:20:06 - End Time 2025-03-03 23:20:06 [2025-03-03 23:20:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601783', 'tblTempUsageDetail_20' ) start [2025-03-03 23:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601783', 'tblTempUsageDetail_20' ) end [2025-03-03 23:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601783', 'tblTempVendorCDR_20' ) start [2025-03-03 23:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601783', 'tblTempVendorCDR_20' ) end [2025-03-03 23:20:18] Production.INFO: ProcessCDR(1,14601783,1,1,2) [2025-03-03 23:20:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601783,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:20:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601783,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:20:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601783,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:20:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601783,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:20:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601783', 'tblTempUsageDetail_20' ) start [2025-03-03 23:20:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601783', 'tblTempUsageDetail_20' ) end [2025-03-03 23:20:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:20:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:20:21] Production.INFO: ==8228== Releasing lock... [2025-03-03 23:20:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:20:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-03 23:21:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:21:05 [end_date_ymd] => 2025-03-03 23:21:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:21:05' and `end` < '2025-03-03 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-03 23:21:17] Production.INFO: count ==645 [2025-03-03 23:21:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:21:05 - End Time 2025-03-03 23:21:05 [2025-03-03 23:21:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601788', 'tblTempUsageDetail_20' ) start [2025-03-03 23:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601788', 'tblTempUsageDetail_20' ) end [2025-03-03 23:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601788', 'tblTempVendorCDR_20' ) start [2025-03-03 23:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601788', 'tblTempVendorCDR_20' ) end [2025-03-03 23:21:17] Production.INFO: ProcessCDR(1,14601788,1,1,2) [2025-03-03 23:21:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601788,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:21:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601788,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:21:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601788,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:21:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601788,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:21:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601788', 'tblTempUsageDetail_20' ) start [2025-03-03 23:21:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601788', 'tblTempUsageDetail_20' ) end [2025-03-03 23:21:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:21:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:21:21] Production.INFO: ==8311== Releasing lock... [2025-03-03 23:21:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:21:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-03 23:22:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:22:05 [end_date_ymd] => 2025-03-03 23:22:05 [RateCDR] => 1 ) [2025-03-03 23:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 20:22:05' and `end` < '2025-03-03 23:22:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 23:22:17] Production.INFO: count ==642 [2025-03-03 23:22:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:22:05 - End Time 2025-03-03 23:22:05 [2025-03-03 23:22:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601793', 'tblTempUsageDetail_20' ) start [2025-03-03 23:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601793', 'tblTempUsageDetail_20' ) end [2025-03-03 23:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601793', 'tblTempVendorCDR_20' ) start [2025-03-03 23:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601793', 'tblTempVendorCDR_20' ) end [2025-03-03 23:22:18] Production.INFO: ProcessCDR(1,14601793,1,1,2) [2025-03-03 23:22:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601793,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:22:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601793,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:22:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601793,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:22:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601793,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601793', 'tblTempUsageDetail_20' ) start [2025-03-03 23:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601793', 'tblTempUsageDetail_20' ) end [2025-03-03 23:22:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:22:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:22:21] Production.INFO: ==8389== Releasing lock... [2025-03-03 23:22:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:22:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-03 23:23:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:23:05 [end_date_ymd] => 2025-03-03 23:23:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:23:05' and `end` < '2025-03-03 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-03 23:23:17] Production.INFO: count ==642 [2025-03-03 23:23:18] Production.ERROR: pbx CDR StartTime 2025-03-03 20:23:05 - End Time 2025-03-03 23:23:05 [2025-03-03 23:23:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:23:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601798', 'tblTempUsageDetail_20' ) start [2025-03-03 23:23:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601798', 'tblTempUsageDetail_20' ) end [2025-03-03 23:23:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601798', 'tblTempVendorCDR_20' ) start [2025-03-03 23:23:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601798', 'tblTempVendorCDR_20' ) end [2025-03-03 23:23:18] Production.INFO: ProcessCDR(1,14601798,1,1,2) [2025-03-03 23:23:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601798,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:23:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601798,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:23:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601798,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:23:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601798,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:23:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601798', 'tblTempUsageDetail_20' ) start [2025-03-03 23:23:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601798', 'tblTempUsageDetail_20' ) end [2025-03-03 23:23:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:23:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:23:21] Production.INFO: ==8469== Releasing lock... [2025-03-03 23:23:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:23:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-03 23:24:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:24:05 [end_date_ymd] => 2025-03-03 23:24:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:24:05' and `end` < '2025-03-03 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-03 23:24:17] Production.INFO: count ==640 [2025-03-03 23:24:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:24:05 - End Time 2025-03-03 23:24:05 [2025-03-03 23:24:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601803', 'tblTempUsageDetail_20' ) start [2025-03-03 23:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601803', 'tblTempUsageDetail_20' ) end [2025-03-03 23:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601803', 'tblTempVendorCDR_20' ) start [2025-03-03 23:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601803', 'tblTempVendorCDR_20' ) end [2025-03-03 23:24:17] Production.INFO: ProcessCDR(1,14601803,1,1,2) [2025-03-03 23:24:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601803,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:24:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601803,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:24:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601803,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:24:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601803,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:24:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601803', 'tblTempUsageDetail_20' ) start [2025-03-03 23:24:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601803', 'tblTempUsageDetail_20' ) end [2025-03-03 23:24:20] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:24:20] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:24:20] Production.INFO: ==8544== Releasing lock... [2025-03-03 23:24:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:24:20] Production.INFO: 32.25 MB #Memory Used# [2025-03-03 23:25:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:25:06 [end_date_ymd] => 2025-03-03 23:25:06 [RateCDR] => 1 ) [2025-03-03 23: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-03 20:25:06' and `end` < '2025-03-03 23: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-03 23:25:18] Production.INFO: count ==643 [2025-03-03 23:25:18] Production.ERROR: pbx CDR StartTime 2025-03-03 20:25:06 - End Time 2025-03-03 23:25:06 [2025-03-03 23:25:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601808', 'tblTempUsageDetail_20' ) start [2025-03-03 23:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601808', 'tblTempUsageDetail_20' ) end [2025-03-03 23:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601808', 'tblTempVendorCDR_20' ) start [2025-03-03 23:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601808', 'tblTempVendorCDR_20' ) end [2025-03-03 23:25:18] Production.INFO: ProcessCDR(1,14601808,1,1,2) [2025-03-03 23:25:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601808,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:25:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601808,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:25:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601808,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:25:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601808,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601808', 'tblTempUsageDetail_20' ) start [2025-03-03 23:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601808', 'tblTempUsageDetail_20' ) end [2025-03-03 23:25:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:25:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:25:21] Production.INFO: ==8623== Releasing lock... [2025-03-03 23:25:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:25:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-03 23:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:26:05 [end_date_ymd] => 2025-03-03 23:26:05 [RateCDR] => 1 ) [2025-03-03 23:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 20:26:05' and `end` < '2025-03-03 23:26:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 23:26:18] Production.INFO: count ==643 [2025-03-03 23:26:18] Production.ERROR: pbx CDR StartTime 2025-03-03 20:26:05 - End Time 2025-03-03 23:26:05 [2025-03-03 23:26:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601813', 'tblTempUsageDetail_20' ) start [2025-03-03 23:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601813', 'tblTempUsageDetail_20' ) end [2025-03-03 23:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601813', 'tblTempVendorCDR_20' ) start [2025-03-03 23:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601813', 'tblTempVendorCDR_20' ) end [2025-03-03 23:26:18] Production.INFO: ProcessCDR(1,14601813,1,1,2) [2025-03-03 23:26:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601813,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:26:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601813,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:26:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601813,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:26:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601813,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:26:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601813', 'tblTempUsageDetail_20' ) start [2025-03-03 23:26:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601813', 'tblTempUsageDetail_20' ) end [2025-03-03 23:26:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:26:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:26:21] Production.INFO: ==8701== Releasing lock... [2025-03-03 23:26:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:26:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-03 23:27:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:27:05 [end_date_ymd] => 2025-03-03 23:27:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:27:05' and `end` < '2025-03-03 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-03 23:27:17] Production.INFO: count ==641 [2025-03-03 23:27:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:27:05 - End Time 2025-03-03 23:27:05 [2025-03-03 23:27:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601818', 'tblTempUsageDetail_20' ) start [2025-03-03 23:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601818', 'tblTempUsageDetail_20' ) end [2025-03-03 23:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601818', 'tblTempVendorCDR_20' ) start [2025-03-03 23:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601818', 'tblTempVendorCDR_20' ) end [2025-03-03 23:27:17] Production.INFO: ProcessCDR(1,14601818,1,1,2) [2025-03-03 23:27:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601818,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:27:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601818,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:27:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601818,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:27:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601818,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:27:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601818', 'tblTempUsageDetail_20' ) start [2025-03-03 23:27:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601818', 'tblTempUsageDetail_20' ) end [2025-03-03 23:27:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:27:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:27:22] Production.INFO: ==8781== Releasing lock... [2025-03-03 23:27:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:27:22] Production.INFO: 32.25 MB #Memory Used# [2025-03-03 23:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:28:05 [end_date_ymd] => 2025-03-03 23:28:05 [RateCDR] => 1 ) [2025-03-03 23:28:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 20:28:05' and `end` < '2025-03-03 23:28:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 23:28:17] Production.INFO: count ==642 [2025-03-03 23:28:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:28:05 - End Time 2025-03-03 23:28:05 [2025-03-03 23:28:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601823', 'tblTempUsageDetail_20' ) start [2025-03-03 23:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601823', 'tblTempUsageDetail_20' ) end [2025-03-03 23:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601823', 'tblTempVendorCDR_20' ) start [2025-03-03 23:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601823', 'tblTempVendorCDR_20' ) end [2025-03-03 23:28:17] Production.INFO: ProcessCDR(1,14601823,1,1,2) [2025-03-03 23:28:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601823,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:28:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601823,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:28:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601823,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:28:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601823,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:28:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601823', 'tblTempUsageDetail_20' ) start [2025-03-03 23:28:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601823', 'tblTempUsageDetail_20' ) end [2025-03-03 23:28:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:28:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:28:22] Production.INFO: ==8854== Releasing lock... [2025-03-03 23:28:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:28:22] Production.INFO: 32.25 MB #Memory Used# [2025-03-03 23:29:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:29:05 [end_date_ymd] => 2025-03-03 23:29:05 [RateCDR] => 1 ) [2025-03-03 23: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-03 20:29:05' and `end` < '2025-03-03 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-03 23:29:18] Production.INFO: count ==640 [2025-03-03 23:29:18] Production.ERROR: pbx CDR StartTime 2025-03-03 20:29:05 - End Time 2025-03-03 23:29:05 [2025-03-03 23:29:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601828', 'tblTempUsageDetail_20' ) start [2025-03-03 23:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601828', 'tblTempUsageDetail_20' ) end [2025-03-03 23:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601828', 'tblTempVendorCDR_20' ) start [2025-03-03 23:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601828', 'tblTempVendorCDR_20' ) end [2025-03-03 23:29:18] Production.INFO: ProcessCDR(1,14601828,1,1,2) [2025-03-03 23:29:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601828,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:29:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601828,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:29:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601828,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:29:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601828,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:29:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601828', 'tblTempUsageDetail_20' ) start [2025-03-03 23:29:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601828', 'tblTempUsageDetail_20' ) end [2025-03-03 23:29:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:29:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:29:21] Production.INFO: ==8936== Releasing lock... [2025-03-03 23:29:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:29:21] Production.INFO: 32.5 MB #Memory Used# [2025-03-03 23:30:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:30:06 [end_date_ymd] => 2025-03-03 23:30:06 [RateCDR] => 1 ) [2025-03-03 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-03 20:30:06' and `end` < '2025-03-03 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-03 23:30:18] Production.INFO: count ==641 [2025-03-03 23:30:18] Production.ERROR: pbx CDR StartTime 2025-03-03 20:30:06 - End Time 2025-03-03 23:30:06 [2025-03-03 23:30:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601834', 'tblTempUsageDetail_20' ) start [2025-03-03 23:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601834', 'tblTempUsageDetail_20' ) end [2025-03-03 23:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601834', 'tblTempVendorCDR_20' ) start [2025-03-03 23:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601834', 'tblTempVendorCDR_20' ) end [2025-03-03 23:30:18] Production.INFO: ProcessCDR(1,14601834,1,1,2) [2025-03-03 23:30:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601834,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:30:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601834,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:30:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601834,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:30:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601834,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:30:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601834', 'tblTempUsageDetail_20' ) start [2025-03-03 23:30:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601834', 'tblTempUsageDetail_20' ) end [2025-03-03 23:30:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:30:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:30:23] Production.INFO: ==9020== Releasing lock... [2025-03-03 23:30:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:30:23] Production.INFO: 32.25 MB #Memory Used# [2025-03-03 23:31:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:31:05 [end_date_ymd] => 2025-03-03 23:31:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:31:05' and `end` < '2025-03-03 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-03 23:31:17] Production.INFO: count ==629 [2025-03-03 23:31:18] Production.ERROR: pbx CDR StartTime 2025-03-03 20:31:05 - End Time 2025-03-03 23:31:05 [2025-03-03 23:31:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601839', 'tblTempUsageDetail_20' ) start [2025-03-03 23:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601839', 'tblTempUsageDetail_20' ) end [2025-03-03 23:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601839', 'tblTempVendorCDR_20' ) start [2025-03-03 23:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601839', 'tblTempVendorCDR_20' ) end [2025-03-03 23:31:18] Production.INFO: ProcessCDR(1,14601839,1,1,2) [2025-03-03 23:31:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601839,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:31:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601839,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:31:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601839,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:31:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601839,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:31:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601839', 'tblTempUsageDetail_20' ) start [2025-03-03 23:31:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601839', 'tblTempUsageDetail_20' ) end [2025-03-03 23:31:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:31:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:31:21] Production.INFO: ==9105== Releasing lock... [2025-03-03 23:31:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:31:21] Production.INFO: 32 MB #Memory Used# [2025-03-03 23:32:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:32:05 [end_date_ymd] => 2025-03-03 23:32:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:32:05' and `end` < '2025-03-03 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-03 23:32:17] Production.INFO: count ==625 [2025-03-03 23:32:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:32:05 - End Time 2025-03-03 23:32:05 [2025-03-03 23:32:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601844', 'tblTempUsageDetail_20' ) start [2025-03-03 23:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601844', 'tblTempUsageDetail_20' ) end [2025-03-03 23:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601844', 'tblTempVendorCDR_20' ) start [2025-03-03 23:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601844', 'tblTempVendorCDR_20' ) end [2025-03-03 23:32:17] Production.INFO: ProcessCDR(1,14601844,1,1,2) [2025-03-03 23:32:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601844,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:32:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601844,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:32:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601844,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:32:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601844,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:32:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601844', 'tblTempUsageDetail_20' ) start [2025-03-03 23:32:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601844', 'tblTempUsageDetail_20' ) end [2025-03-03 23:32:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:32:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:32:21] Production.INFO: ==9224== Releasing lock... [2025-03-03 23:32:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:32:21] Production.INFO: 32 MB #Memory Used# [2025-03-03 23:33:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:33:05 [end_date_ymd] => 2025-03-03 23:33:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:33:05' and `end` < '2025-03-03 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-03 23:33:17] Production.INFO: count ==625 [2025-03-03 23:33:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:33:05 - End Time 2025-03-03 23:33:05 [2025-03-03 23:33:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601849', 'tblTempUsageDetail_20' ) start [2025-03-03 23:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601849', 'tblTempUsageDetail_20' ) end [2025-03-03 23:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601849', 'tblTempVendorCDR_20' ) start [2025-03-03 23:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601849', 'tblTempVendorCDR_20' ) end [2025-03-03 23:33:17] Production.INFO: ProcessCDR(1,14601849,1,1,2) [2025-03-03 23:33:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601849,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:33:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601849,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:33:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601849,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:33:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601849,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:33:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601849', 'tblTempUsageDetail_20' ) start [2025-03-03 23:33:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601849', 'tblTempUsageDetail_20' ) end [2025-03-03 23:33:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:33:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:33:21] Production.INFO: ==9302== Releasing lock... [2025-03-03 23:33:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:33:21] Production.INFO: 32 MB #Memory Used# [2025-03-03 23:34:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:34:05 [end_date_ymd] => 2025-03-03 23:34:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:34:05' and `end` < '2025-03-03 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-03 23:34:17] Production.INFO: count ==625 [2025-03-03 23:34:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:34:05 - End Time 2025-03-03 23:34:05 [2025-03-03 23:34:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601854', 'tblTempUsageDetail_20' ) start [2025-03-03 23:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601854', 'tblTempUsageDetail_20' ) end [2025-03-03 23:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601854', 'tblTempVendorCDR_20' ) start [2025-03-03 23:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601854', 'tblTempVendorCDR_20' ) end [2025-03-03 23:34:17] Production.INFO: ProcessCDR(1,14601854,1,1,2) [2025-03-03 23:34:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601854,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:34:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601854,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:34:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601854,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:34:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601854,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:34:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601854', 'tblTempUsageDetail_20' ) start [2025-03-03 23:34:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601854', 'tblTempUsageDetail_20' ) end [2025-03-03 23:34:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:34:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:34:21] Production.INFO: ==9384== Releasing lock... [2025-03-03 23:34:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:34:21] Production.INFO: 32 MB #Memory Used# [2025-03-03 23:35:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:35:06 [end_date_ymd] => 2025-03-03 23:35:06 [RateCDR] => 1 ) [2025-03-03 23: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-03 20:35:06' and `end` < '2025-03-03 23: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-03 23:35:18] Production.INFO: count ==615 [2025-03-03 23:35:18] Production.ERROR: pbx CDR StartTime 2025-03-03 20:35:06 - End Time 2025-03-03 23:35:06 [2025-03-03 23:35:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601859', 'tblTempUsageDetail_20' ) start [2025-03-03 23:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601859', 'tblTempUsageDetail_20' ) end [2025-03-03 23:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601859', 'tblTempVendorCDR_20' ) start [2025-03-03 23:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601859', 'tblTempVendorCDR_20' ) end [2025-03-03 23:35:18] Production.INFO: ProcessCDR(1,14601859,1,1,2) [2025-03-03 23:35:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601859,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:35:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601859,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:35:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601859,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:35:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601859,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:35:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601859', 'tblTempUsageDetail_20' ) start [2025-03-03 23:35:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601859', 'tblTempUsageDetail_20' ) end [2025-03-03 23:35:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:35:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:35:22] Production.INFO: ==9463== Releasing lock... [2025-03-03 23:35:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:35:22] Production.INFO: 32 MB #Memory Used# [2025-03-03 23:36:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:36:05 [end_date_ymd] => 2025-03-03 23:36:05 [RateCDR] => 1 ) [2025-03-03 23:36:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 20:36:05' and `end` < '2025-03-03 23:36:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 23:36:17] Production.INFO: count ==614 [2025-03-03 23:36:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:36:05 - End Time 2025-03-03 23:36:05 [2025-03-03 23:36:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601864', 'tblTempUsageDetail_20' ) start [2025-03-03 23:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601864', 'tblTempUsageDetail_20' ) end [2025-03-03 23:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601864', 'tblTempVendorCDR_20' ) start [2025-03-03 23:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601864', 'tblTempVendorCDR_20' ) end [2025-03-03 23:36:17] Production.INFO: ProcessCDR(1,14601864,1,1,2) [2025-03-03 23:36:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601864,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:36:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601864,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:36:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601864,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:36:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601864,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:36:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601864', 'tblTempUsageDetail_20' ) start [2025-03-03 23:36:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601864', 'tblTempUsageDetail_20' ) end [2025-03-03 23:36:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:36:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:36:22] Production.INFO: ==9542== Releasing lock... [2025-03-03 23:36:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:36:22] Production.INFO: 32.25 MB #Memory Used# [2025-03-03 23:37:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:37:05 [end_date_ymd] => 2025-03-03 23:37:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:37:05' and `end` < '2025-03-03 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-03 23:37:17] Production.INFO: count ==614 [2025-03-03 23:37:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:37:05 - End Time 2025-03-03 23:37:05 [2025-03-03 23:37:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601869', 'tblTempUsageDetail_20' ) start [2025-03-03 23:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601869', 'tblTempUsageDetail_20' ) end [2025-03-03 23:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601869', 'tblTempVendorCDR_20' ) start [2025-03-03 23:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601869', 'tblTempVendorCDR_20' ) end [2025-03-03 23:37:17] Production.INFO: ProcessCDR(1,14601869,1,1,2) [2025-03-03 23:37:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601869,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:37:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601869,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:37:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601869,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:37:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601869,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:37:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601869', 'tblTempUsageDetail_20' ) start [2025-03-03 23:37:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601869', 'tblTempUsageDetail_20' ) end [2025-03-03 23:37:23] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:37:23] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:37:23] Production.INFO: ==9621== Releasing lock... [2025-03-03 23:37:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:37:23] Production.INFO: 32.25 MB #Memory Used# [2025-03-03 23:38:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:38:05 [end_date_ymd] => 2025-03-03 23:38:05 [RateCDR] => 1 ) [2025-03-03 23: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-03 20:38:05' and `end` < '2025-03-03 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-03 23:38:18] Production.INFO: count ==614 [2025-03-03 23:38:18] Production.ERROR: pbx CDR StartTime 2025-03-03 20:38:05 - End Time 2025-03-03 23:38:05 [2025-03-03 23:38:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601874', 'tblTempUsageDetail_20' ) start [2025-03-03 23:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601874', 'tblTempUsageDetail_20' ) end [2025-03-03 23:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601874', 'tblTempVendorCDR_20' ) start [2025-03-03 23:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601874', 'tblTempVendorCDR_20' ) end [2025-03-03 23:38:18] Production.INFO: ProcessCDR(1,14601874,1,1,2) [2025-03-03 23:38:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601874,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:38:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601874,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:38:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601874,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:38:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601874,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601874', 'tblTempUsageDetail_20' ) start [2025-03-03 23:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601874', 'tblTempUsageDetail_20' ) end [2025-03-03 23:38:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:38:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:38:21] Production.INFO: ==9704== Releasing lock... [2025-03-03 23:38:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:38:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-03 23:39:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:39:05 [end_date_ymd] => 2025-03-03 23:39:05 [RateCDR] => 1 ) [2025-03-03 23:39:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 20:39:05' and `end` < '2025-03-03 23:39:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 23:39:17] Production.INFO: count ==614 [2025-03-03 23:39:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:39:05 - End Time 2025-03-03 23:39:05 [2025-03-03 23:39:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601879', 'tblTempUsageDetail_20' ) start [2025-03-03 23:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601879', 'tblTempUsageDetail_20' ) end [2025-03-03 23:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601879', 'tblTempVendorCDR_20' ) start [2025-03-03 23:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601879', 'tblTempVendorCDR_20' ) end [2025-03-03 23:39:17] Production.INFO: ProcessCDR(1,14601879,1,1,2) [2025-03-03 23:39:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601879,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:39:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601879,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:39:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601879,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:39:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601879,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:39:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601879', 'tblTempUsageDetail_20' ) start [2025-03-03 23:39:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601879', 'tblTempUsageDetail_20' ) end [2025-03-03 23:39:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:39:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:39:21] Production.INFO: ==9783== Releasing lock... [2025-03-03 23:39:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:39:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-03 23:40:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:40:06 [end_date_ymd] => 2025-03-03 23:40:06 [RateCDR] => 1 ) [2025-03-03 23:40:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 20:40:06' and `end` < '2025-03-03 23:40:06' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 23:40:18] Production.INFO: count ==614 [2025-03-03 23:40:18] Production.ERROR: pbx CDR StartTime 2025-03-03 20:40:06 - End Time 2025-03-03 23:40:06 [2025-03-03 23:40:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601884', 'tblTempUsageDetail_20' ) start [2025-03-03 23:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601884', 'tblTempUsageDetail_20' ) end [2025-03-03 23:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601884', 'tblTempVendorCDR_20' ) start [2025-03-03 23:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601884', 'tblTempVendorCDR_20' ) end [2025-03-03 23:40:18] Production.INFO: ProcessCDR(1,14601884,1,1,2) [2025-03-03 23:40:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601884,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:40:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601884,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:40:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601884,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:40:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601884,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:40:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601884', 'tblTempUsageDetail_20' ) start [2025-03-03 23:40:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601884', 'tblTempUsageDetail_20' ) end [2025-03-03 23:40:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:40:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:40:21] Production.INFO: ==9867== Releasing lock... [2025-03-03 23:40:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:40:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-03 23:41:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:41:05 [end_date_ymd] => 2025-03-03 23:41:05 [RateCDR] => 1 ) [2025-03-03 23: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-03 20:41:05' and `end` < '2025-03-03 23: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-03 23:41:17] Production.INFO: count ==610 [2025-03-03 23:41:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:41:05 - End Time 2025-03-03 23:41:05 [2025-03-03 23:41:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601890', 'tblTempUsageDetail_20' ) start [2025-03-03 23:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601890', 'tblTempUsageDetail_20' ) end [2025-03-03 23:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601890', 'tblTempVendorCDR_20' ) start [2025-03-03 23:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601890', 'tblTempVendorCDR_20' ) end [2025-03-03 23:41:17] Production.INFO: ProcessCDR(1,14601890,1,1,2) [2025-03-03 23:41:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601890,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:41:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601890,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:41:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601890,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:41:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601890,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:41:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601890', 'tblTempUsageDetail_20' ) start [2025-03-03 23:41:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601890', 'tblTempUsageDetail_20' ) end [2025-03-03 23:41:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:41:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:41:22] Production.INFO: ==9951== Releasing lock... [2025-03-03 23:41:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:41:22] Production.INFO: 32 MB #Memory Used# [2025-03-03 23:42:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:42:05 [end_date_ymd] => 2025-03-03 23:42:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:42:05' and `end` < '2025-03-03 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-03 23:42:17] Production.INFO: count ==610 [2025-03-03 23:42:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:42:05 - End Time 2025-03-03 23:42:05 [2025-03-03 23:42:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601895', 'tblTempUsageDetail_20' ) start [2025-03-03 23:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601895', 'tblTempUsageDetail_20' ) end [2025-03-03 23:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601895', 'tblTempVendorCDR_20' ) start [2025-03-03 23:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601895', 'tblTempVendorCDR_20' ) end [2025-03-03 23:42:17] Production.INFO: ProcessCDR(1,14601895,1,1,2) [2025-03-03 23:42:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601895,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:42:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601895,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:42:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601895,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:42:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601895,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:42:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601895', 'tblTempUsageDetail_20' ) start [2025-03-03 23:42:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601895', 'tblTempUsageDetail_20' ) end [2025-03-03 23:42:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:42:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:42:21] Production.INFO: ==10028== Releasing lock... [2025-03-03 23:42:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:42:21] Production.INFO: 32 MB #Memory Used# [2025-03-03 23:43:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:43:05 [end_date_ymd] => 2025-03-03 23:43:05 [RateCDR] => 1 ) [2025-03-03 23:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 20:43:05' and `end` < '2025-03-03 23:43:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 23:43:17] Production.INFO: count ==610 [2025-03-03 23:43:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:43:05 - End Time 2025-03-03 23:43:05 [2025-03-03 23:43:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601900', 'tblTempUsageDetail_20' ) start [2025-03-03 23:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601900', 'tblTempUsageDetail_20' ) end [2025-03-03 23:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601900', 'tblTempVendorCDR_20' ) start [2025-03-03 23:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601900', 'tblTempVendorCDR_20' ) end [2025-03-03 23:43:17] Production.INFO: ProcessCDR(1,14601900,1,1,2) [2025-03-03 23:43:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601900,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:43:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601900,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:43:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601900,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:43:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601900,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:43:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601900', 'tblTempUsageDetail_20' ) start [2025-03-03 23:43:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601900', 'tblTempUsageDetail_20' ) end [2025-03-03 23:43:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:43:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:43:22] Production.INFO: ==10110== Releasing lock... [2025-03-03 23:43:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:43:22] Production.INFO: 32 MB #Memory Used# [2025-03-03 23:44:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:44:06 [end_date_ymd] => 2025-03-03 23:44:06 [RateCDR] => 1 ) [2025-03-03 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-03 20:44:06' and `end` < '2025-03-03 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-03 23:44:17] Production.INFO: count ==608 [2025-03-03 23:44:18] Production.ERROR: pbx CDR StartTime 2025-03-03 20:44:06 - End Time 2025-03-03 23:44:06 [2025-03-03 23:44:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601905', 'tblTempUsageDetail_20' ) start [2025-03-03 23:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601905', 'tblTempUsageDetail_20' ) end [2025-03-03 23:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601905', 'tblTempVendorCDR_20' ) start [2025-03-03 23:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601905', 'tblTempVendorCDR_20' ) end [2025-03-03 23:44:18] Production.INFO: ProcessCDR(1,14601905,1,1,2) [2025-03-03 23:44:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601905,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:44:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601905,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:44:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601905,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:44:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601905,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601905', 'tblTempUsageDetail_20' ) start [2025-03-03 23:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601905', 'tblTempUsageDetail_20' ) end [2025-03-03 23:44:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:44:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:44:21] Production.INFO: ==10190== Releasing lock... [2025-03-03 23:44:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:44:21] Production.INFO: 32 MB #Memory Used# [2025-03-03 23:45:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:45:05 [end_date_ymd] => 2025-03-03 23:45:05 [RateCDR] => 1 ) [2025-03-03 23:45:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 20:45:05' and `end` < '2025-03-03 23:45:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 23:45:17] Production.INFO: count ==606 [2025-03-03 23:45:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:45:05 - End Time 2025-03-03 23:45:05 [2025-03-03 23:45:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601910', 'tblTempUsageDetail_20' ) start [2025-03-03 23:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601910', 'tblTempUsageDetail_20' ) end [2025-03-03 23:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601910', 'tblTempVendorCDR_20' ) start [2025-03-03 23:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601910', 'tblTempVendorCDR_20' ) end [2025-03-03 23:45:17] Production.INFO: ProcessCDR(1,14601910,1,1,2) [2025-03-03 23:45:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601910,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:45:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601910,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:45:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601910,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:45:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601910,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:45:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601910', 'tblTempUsageDetail_20' ) start [2025-03-03 23:45:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601910', 'tblTempUsageDetail_20' ) end [2025-03-03 23:45:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:45:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:45:22] Production.INFO: ==10271== Releasing lock... [2025-03-03 23:45:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:45:22] Production.INFO: 32.25 MB #Memory Used# [2025-03-03 23:46:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:46:05 [end_date_ymd] => 2025-03-03 23:46:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:46:05' and `end` < '2025-03-03 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-03 23:46:18] Production.INFO: count ==601 [2025-03-03 23:46:18] Production.ERROR: pbx CDR StartTime 2025-03-03 20:46:05 - End Time 2025-03-03 23:46:05 [2025-03-03 23:46:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601915', 'tblTempUsageDetail_20' ) start [2025-03-03 23:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601915', 'tblTempUsageDetail_20' ) end [2025-03-03 23:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601915', 'tblTempVendorCDR_20' ) start [2025-03-03 23:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601915', 'tblTempVendorCDR_20' ) end [2025-03-03 23:46:18] Production.INFO: ProcessCDR(1,14601915,1,1,2) [2025-03-03 23:46:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601915,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:46:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601915,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:46:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601915,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:46:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601915,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601915', 'tblTempUsageDetail_20' ) start [2025-03-03 23:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601915', 'tblTempUsageDetail_20' ) end [2025-03-03 23:46:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:46:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:46:21] Production.INFO: ==10350== Releasing lock... [2025-03-03 23:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:46:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-03 23:47:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:47:05 [end_date_ymd] => 2025-03-03 23:47:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:47:05' and `end` < '2025-03-03 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-03 23:47:17] Production.INFO: count ==598 [2025-03-03 23:47:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:47:05 - End Time 2025-03-03 23:47:05 [2025-03-03 23:47:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601920', 'tblTempUsageDetail_20' ) start [2025-03-03 23:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601920', 'tblTempUsageDetail_20' ) end [2025-03-03 23:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601920', 'tblTempVendorCDR_20' ) start [2025-03-03 23:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601920', 'tblTempVendorCDR_20' ) end [2025-03-03 23:47:17] Production.INFO: ProcessCDR(1,14601920,1,1,2) [2025-03-03 23:47:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601920,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:47:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601920,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:47:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601920,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:47:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601920,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:47:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601920', 'tblTempUsageDetail_20' ) start [2025-03-03 23:47:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601920', 'tblTempUsageDetail_20' ) end [2025-03-03 23:47:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:47:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:47:21] Production.INFO: ==10466== Releasing lock... [2025-03-03 23:47:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:47:21] Production.INFO: 32 MB #Memory Used# [2025-03-03 23:48:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:48:05 [end_date_ymd] => 2025-03-03 23:48:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:48:05' and `end` < '2025-03-03 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-03 23:48:17] Production.INFO: count ==597 [2025-03-03 23:48:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:48:05 - End Time 2025-03-03 23:48:05 [2025-03-03 23:48:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601925', 'tblTempUsageDetail_20' ) start [2025-03-03 23:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601925', 'tblTempUsageDetail_20' ) end [2025-03-03 23:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601925', 'tblTempVendorCDR_20' ) start [2025-03-03 23:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601925', 'tblTempVendorCDR_20' ) end [2025-03-03 23:48:18] Production.INFO: ProcessCDR(1,14601925,1,1,2) [2025-03-03 23:48:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601925,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:48:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601925,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:48:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601925,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:48:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601925,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:48:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601925', 'tblTempUsageDetail_20' ) start [2025-03-03 23:48:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601925', 'tblTempUsageDetail_20' ) end [2025-03-03 23:48:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:48:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:48:21] Production.INFO: ==10541== Releasing lock... [2025-03-03 23:48:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:48:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-03 23:49:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:49:05 [end_date_ymd] => 2025-03-03 23:49:05 [RateCDR] => 1 ) [2025-03-03 23:49:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 20:49:05' and `end` < '2025-03-03 23:49:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 23:49:16] Production.INFO: count ==594 [2025-03-03 23:49:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:49:05 - End Time 2025-03-03 23:49:05 [2025-03-03 23:49:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601930', 'tblTempUsageDetail_20' ) start [2025-03-03 23:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601930', 'tblTempUsageDetail_20' ) end [2025-03-03 23:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601930', 'tblTempVendorCDR_20' ) start [2025-03-03 23:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601930', 'tblTempVendorCDR_20' ) end [2025-03-03 23:49:17] Production.INFO: ProcessCDR(1,14601930,1,1,2) [2025-03-03 23:49:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601930,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:49:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601930,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:49:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601930,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:49:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601930,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:49:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601930', 'tblTempUsageDetail_20' ) start [2025-03-03 23:49:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601930', 'tblTempUsageDetail_20' ) end [2025-03-03 23:49:20] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:49:20] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:49:20] Production.INFO: ==10619== Releasing lock... [2025-03-03 23:49:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:49:20] Production.INFO: 31.75 MB #Memory Used# [2025-03-03 23:50:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:50:06 [end_date_ymd] => 2025-03-03 23:50:06 [RateCDR] => 1 ) [2025-03-03 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-03 20:50:06' and `end` < '2025-03-03 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-03 23:50:18] Production.INFO: count ==591 [2025-03-03 23:50:18] Production.ERROR: pbx CDR StartTime 2025-03-03 20:50:06 - End Time 2025-03-03 23:50:06 [2025-03-03 23:50:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601935', 'tblTempUsageDetail_20' ) start [2025-03-03 23:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601935', 'tblTempUsageDetail_20' ) end [2025-03-03 23:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601935', 'tblTempVendorCDR_20' ) start [2025-03-03 23:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601935', 'tblTempVendorCDR_20' ) end [2025-03-03 23:50:18] Production.INFO: ProcessCDR(1,14601935,1,1,2) [2025-03-03 23:50:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601935,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:50:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601935,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:50:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601935,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:50:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601935,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:50:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601935', 'tblTempUsageDetail_20' ) start [2025-03-03 23:50:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601935', 'tblTempUsageDetail_20' ) end [2025-03-03 23:50:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:50:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:50:21] Production.INFO: ==10714== Releasing lock... [2025-03-03 23:50:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:50:21] Production.INFO: 32 MB #Memory Used# [2025-03-03 23:51:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:51:05 [end_date_ymd] => 2025-03-03 23:51:05 [RateCDR] => 1 ) [2025-03-03 23:51:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-03 20:51:05' and `end` < '2025-03-03 23:51:05' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-03 23:51:17] Production.INFO: count ==592 [2025-03-03 23:51:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:51:05 - End Time 2025-03-03 23:51:05 [2025-03-03 23:51:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601941', 'tblTempUsageDetail_20' ) start [2025-03-03 23:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601941', 'tblTempUsageDetail_20' ) end [2025-03-03 23:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601941', 'tblTempVendorCDR_20' ) start [2025-03-03 23:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601941', 'tblTempVendorCDR_20' ) end [2025-03-03 23:51:17] Production.INFO: ProcessCDR(1,14601941,1,1,2) [2025-03-03 23:51:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601941,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:51:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601941,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:51:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601941,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:51:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601941,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:51:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601941', 'tblTempUsageDetail_20' ) start [2025-03-03 23:51:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601941', 'tblTempUsageDetail_20' ) end [2025-03-03 23:51:20] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:51:20] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:51:20] Production.INFO: ==10797== Releasing lock... [2025-03-03 23:51:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:51:20] Production.INFO: 31.75 MB #Memory Used# [2025-03-03 23:52:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:52:05 [end_date_ymd] => 2025-03-03 23:52:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:52:05' and `end` < '2025-03-03 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-03 23:52:17] Production.INFO: count ==587 [2025-03-03 23:52:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:52:05 - End Time 2025-03-03 23:52:05 [2025-03-03 23:52:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601946', 'tblTempUsageDetail_20' ) start [2025-03-03 23:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601946', 'tblTempUsageDetail_20' ) end [2025-03-03 23:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601946', 'tblTempVendorCDR_20' ) start [2025-03-03 23:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601946', 'tblTempVendorCDR_20' ) end [2025-03-03 23:52:18] Production.INFO: ProcessCDR(1,14601946,1,1,2) [2025-03-03 23:52:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601946,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:52:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601946,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:52:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601946,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:52:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601946,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:52:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601946', 'tblTempUsageDetail_20' ) start [2025-03-03 23:52:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601946', 'tblTempUsageDetail_20' ) end [2025-03-03 23:52:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:52:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:52:21] Production.INFO: ==10876== Releasing lock... [2025-03-03 23:52:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:52:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-03 23:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:53:05 [end_date_ymd] => 2025-03-03 23:53:05 [RateCDR] => 1 ) [2025-03-03 23: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-03 20:53:05' and `end` < '2025-03-03 23: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-03 23:53:17] Production.INFO: count ==586 [2025-03-03 23:53:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:53:05 - End Time 2025-03-03 23:53:05 [2025-03-03 23:53:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601951', 'tblTempUsageDetail_20' ) start [2025-03-03 23:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601951', 'tblTempUsageDetail_20' ) end [2025-03-03 23:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601951', 'tblTempVendorCDR_20' ) start [2025-03-03 23:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601951', 'tblTempVendorCDR_20' ) end [2025-03-03 23:53:17] Production.INFO: ProcessCDR(1,14601951,1,1,2) [2025-03-03 23:53:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601951,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:53:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601951,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:53:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601951,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:53:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601951,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:53:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601951', 'tblTempUsageDetail_20' ) start [2025-03-03 23:53:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601951', 'tblTempUsageDetail_20' ) end [2025-03-03 23:53:20] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:53:20] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:53:20] Production.INFO: ==10956== Releasing lock... [2025-03-03 23:53:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:53:20] Production.INFO: 31.75 MB #Memory Used# [2025-03-03 23:54:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:54:05 [end_date_ymd] => 2025-03-03 23:54:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:54:05' and `end` < '2025-03-03 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-03 23:54:17] Production.INFO: count ==586 [2025-03-03 23:54:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:54:05 - End Time 2025-03-03 23:54:05 [2025-03-03 23:54:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601956', 'tblTempUsageDetail_20' ) start [2025-03-03 23:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601956', 'tblTempUsageDetail_20' ) end [2025-03-03 23:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601956', 'tblTempVendorCDR_20' ) start [2025-03-03 23:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601956', 'tblTempVendorCDR_20' ) end [2025-03-03 23:54:17] Production.INFO: ProcessCDR(1,14601956,1,1,2) [2025-03-03 23:54:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601956,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:54:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601956,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:54:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601956,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:54:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601956,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:54:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601956', 'tblTempUsageDetail_20' ) start [2025-03-03 23:54:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601956', 'tblTempUsageDetail_20' ) end [2025-03-03 23:54:20] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:54:20] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:54:20] Production.INFO: ==11032== Releasing lock... [2025-03-03 23:54:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:54:20] Production.INFO: 31.75 MB #Memory Used# [2025-03-03 23:55:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:55:05 [end_date_ymd] => 2025-03-03 23:55:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:55:05' and `end` < '2025-03-03 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-03 23:55:17] Production.INFO: count ==586 [2025-03-03 23:55:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:55:05 - End Time 2025-03-03 23:55:05 [2025-03-03 23:55:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601961', 'tblTempUsageDetail_20' ) start [2025-03-03 23:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601961', 'tblTempUsageDetail_20' ) end [2025-03-03 23:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601961', 'tblTempVendorCDR_20' ) start [2025-03-03 23:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601961', 'tblTempVendorCDR_20' ) end [2025-03-03 23:55:17] Production.INFO: ProcessCDR(1,14601961,1,1,2) [2025-03-03 23:55:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601961,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:55:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601961,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:55:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601961,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:55:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601961,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601961', 'tblTempUsageDetail_20' ) start [2025-03-03 23:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601961', 'tblTempUsageDetail_20' ) end [2025-03-03 23:55:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:55:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:55:21] Production.INFO: ==11109== Releasing lock... [2025-03-03 23:55:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:55:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-03 23:56:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:56:05 [end_date_ymd] => 2025-03-03 23:56:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:56:05' and `end` < '2025-03-03 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-03 23:56:17] Production.INFO: count ==588 [2025-03-03 23:56:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:56:05 - End Time 2025-03-03 23:56:05 [2025-03-03 23:56:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601966', 'tblTempUsageDetail_20' ) start [2025-03-03 23:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601966', 'tblTempUsageDetail_20' ) end [2025-03-03 23:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601966', 'tblTempVendorCDR_20' ) start [2025-03-03 23:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601966', 'tblTempVendorCDR_20' ) end [2025-03-03 23:56:17] Production.INFO: ProcessCDR(1,14601966,1,1,2) [2025-03-03 23:56:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601966,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:56:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601966,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:56:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601966,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:56:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601966,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:56:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601966', 'tblTempUsageDetail_20' ) start [2025-03-03 23:56:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601966', 'tblTempUsageDetail_20' ) end [2025-03-03 23:56:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:56:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:56:22] Production.INFO: ==11190== Releasing lock... [2025-03-03 23:56:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:56:22] Production.INFO: 31.75 MB #Memory Used# [2025-03-03 23:57:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:57:05 [end_date_ymd] => 2025-03-03 23:57:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:57:05' and `end` < '2025-03-03 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-03 23:57:17] Production.INFO: count ==585 [2025-03-03 23:57:17] Production.ERROR: pbx CDR StartTime 2025-03-03 20:57:05 - End Time 2025-03-03 23:57:05 [2025-03-03 23:57:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601971', 'tblTempUsageDetail_20' ) start [2025-03-03 23:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601971', 'tblTempUsageDetail_20' ) end [2025-03-03 23:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601971', 'tblTempVendorCDR_20' ) start [2025-03-03 23:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601971', 'tblTempVendorCDR_20' ) end [2025-03-03 23:57:17] Production.INFO: ProcessCDR(1,14601971,1,1,2) [2025-03-03 23:57:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601971,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:57:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601971,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:57:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601971,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:57:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601971,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:57:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601971', 'tblTempUsageDetail_20' ) start [2025-03-03 23:57:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601971', 'tblTempUsageDetail_20' ) end [2025-03-03 23:57:22] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:57:22] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:57:22] Production.INFO: ==11268== Releasing lock... [2025-03-03 23:57:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:57:22] Production.INFO: 31.75 MB #Memory Used# [2025-03-03 23:58:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:58:05 [end_date_ymd] => 2025-03-03 23:58:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:58:05' and `end` < '2025-03-03 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-03 23:58:17] Production.INFO: count ==585 [2025-03-03 23:58:18] Production.ERROR: pbx CDR StartTime 2025-03-03 20:58:05 - End Time 2025-03-03 23:58:05 [2025-03-03 23:58:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601976', 'tblTempUsageDetail_20' ) start [2025-03-03 23:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601976', 'tblTempUsageDetail_20' ) end [2025-03-03 23:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601976', 'tblTempVendorCDR_20' ) start [2025-03-03 23:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601976', 'tblTempVendorCDR_20' ) end [2025-03-03 23:58:18] Production.INFO: ProcessCDR(1,14601976,1,1,2) [2025-03-03 23:58:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601976,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:58:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601976,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:58:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601976,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:58:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601976,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:58:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601976', 'tblTempUsageDetail_20' ) start [2025-03-03 23:58:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601976', 'tblTempUsageDetail_20' ) end [2025-03-03 23:58:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:58:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:58:21] Production.INFO: ==11350== Releasing lock... [2025-03-03 23:58:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:58:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-03 23:59:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-03 20:59:05 [end_date_ymd] => 2025-03-03 23:59:05 [RateCDR] => 1 ) [2025-03-03 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-03 20:59:05' and `end` < '2025-03-03 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-03 23:59:17] Production.INFO: count ==585 [2025-03-03 23:59:18] Production.ERROR: pbx CDR StartTime 2025-03-03 20:59:05 - End Time 2025-03-03 23:59:05 [2025-03-03 23:59:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-03 23:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601981', 'tblTempUsageDetail_20' ) start [2025-03-03 23:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14601981', 'tblTempUsageDetail_20' ) end [2025-03-03 23:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601981', 'tblTempVendorCDR_20' ) start [2025-03-03 23:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14601981', 'tblTempVendorCDR_20' ) end [2025-03-03 23:59:18] Production.INFO: ProcessCDR(1,14601981,1,1,2) [2025-03-03 23:59:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14601981,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:59:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14601981,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-03 23:59:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14601981,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:59:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14601981,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-03 23:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601981', 'tblTempUsageDetail_20' ) start [2025-03-03 23:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14601981', 'tblTempUsageDetail_20' ) end [2025-03-03 23:59:21] Production.ERROR: pbx prc_insertCDR start [2025-03-03 23:59:21] Production.ERROR: pbx prc_insertCDR end [2025-03-03 23:59:21] Production.INFO: ==11424== Releasing lock... [2025-03-03 23:59:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-03 23:59:21] Production.INFO: 31.75 MB #Memory Used#